Published April 17, 2018 | Version v1.0.1
Software Open

brucellino/black-panther: Community Health Compliance Profile for GitHub repos

Creators

  • 1. EGI Foundation

Description

Black Panther ✊🏿 Profile

This is an InSpec profile for testing the community health of GitHub repositories. It uses the GitHub v3 API

Community Health

GitHub measures community health in terms of the indicators of community-friendly content of a repository, building on the Open Source Guide. A strong community can be enabled by clear guides and clear supporting documentation explaining how to contribute, what recognition is given for contributions and ensuring quality in the process of maintaining the repository.

This is done by consuming the repository's community object via the GitHub API, and detecting deviations from expected profiles.

Using

This profile can be used to easily check the "healthiness" of your community's GitHub repositories, by applying a common compliance check to them. Use this profile to scan all of your repositories and highlight ones which are not yet community friendly. The tests that are made only check for the existence of files which signal community-friendliness, not for their content. Feel free to use this as a dependency of your community compliance profile if you have a specific text or license that you use.

In order to use this profile, you need two environment variables to be set:

  • GITHUB_REPO: GitHub repository you want to test e.g. EGI-Foundation/ansible-style-guide
  • GITHUB_TOKEN: Personal API Token
  • Ruby and bundler
  • The Gems - bundle install

Once your environment is set up, you can run the profile :

inspec exec .
WARN: Unresolved specs during Gem::Specification.reset:
      net-ssh (< 5.0, >= 2.6.5, >= 2.9)
      ffi (>= 1.0.1)
      multi_json (~> 1.10)
      http-cookie (~> 1.0.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.

Profile: Profile for GitHub Community Health (Black Panther)
Version: 0.1.0
Target:  local://

  ✔  Power to the People: Black Panther ✊🏿
     ✔  JSON black-panther.json health_percentage should be > 75
     ✔  JSON black-panther.json ["documentation"] should be
     ✔  JSON black-panther.json ["files", "contributing"] should be
     ✔  JSON black-panther.json ["files", "readme"] should be
     ✔  JSON black-panther.json ["files", "pull_request_template"] should be
  ✔  I fought the law, but the law won: Wynona Earp  👮 ‍♀️
     ✔  JSON black-panther.json ["files", "code_of_conduct"] should be
     ✔  JSON black-panther.json ["files", "license", "key"] should match ".*pache.*"
     ✔  JSON black-panther.json ["files", "license", "spdx_id"] should cmp == "Apache-2.0"


Profile Summary: 2 successful controls, 0 control failures, 0 controls skipped
Test Summary: 8 successful, 0 failures, 0 skipped
Find it in the supermarket

This is an Inspec profile registered in the Chef Supermarket.

inspec supermarket info brucellino/black-panther
name:   black-panther
owner:  brucellino
url:    https://github.com/brucellino/black-panther

description:   A GitHub community health profile compliance check

You can add it to your compliance profile by add a depends section to your inspec.yml :

depends:
- name: supermarket-profile
  supermarket: brucellino/black-panther
Citing

Files

brucellino/black-panther-v1.0.1.zip

Files (14.7 kB)

Name Size Download all
md5:d54e2ad0779c1300a90f5cda2716fa69
14.7 kB Preview Download

Additional details