brucellino / black-panther

An Inspec profile for github community health

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Dependency Status Maintainability DOI

Black Panther โœŠ๐Ÿฟ Profile

An InSpec profile for testing the community health of GitHub repositories. It uses the GitHub v3 API

For more information, please see the documentation

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

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

You can add this to your CI pipeline - see the accompanying .travis.yml

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

If you use this for any kind of academic purpose, please cite as:

Bruce Becker. (2018, April 17). brucellino/black-panther: Community Health Compliance Profile for GitHub repos (Version v1.0.1). Zenodo. http://doi.org/10.5281/zenodo.1219644

About

An Inspec profile for github community health

License:Apache License 2.0


Languages

Language:Ruby 100.0%