npm install -g
- Node 8 (ES6 support for Promises)
- Be member of the organization for private repositories
- full repo scope granted to personal access token
- Github credentials
- If using Github Enterprise, you'll need your api endpoint. Usually looks like the base url you know appended with /api/v3, i.e https://my-ghe-instance.mycompany.com/api/v3.
- github-stats repoList <Org name> -t <GitHubToken>
- github-stats repoContributorCount <Org name> <Repo Name> -t <GitHubToken>
- github-stats orgContributorCount <Org name> -t <GitHubToken>
Example: github-stats orgContributorCount snyk -t <my_github_token>
- Use -p or --private to restrict to private repos only (repoList and orgContributorCount only)
- use --apiurl to set the url of your Github Enterprise instance API Endpoint (i.e --apiurl=https://my-ghe-instance.company.com/api/v3)
- if using proxy, exporting the http_proxy settings should do the trick. Google search the details of how to set that up, pretty straightforward.
Github does not return results immediately. So it is very likely not to return any results at first. Try again after a few minutes and you'll get the results. (see Github's word about caching)
- repoList: List all repositories under an organization. Can filter on private repos only (--private).
- repoContributorCount: List the number of active contributors for a specific repositories
- orgContributorCount: List the number of active contributors for an entire organization.. Can filter on private repos only (--private).
An active contributor to a repo is someone who has committed code at least once in the last 90 days.
- username and password attempts, mainly because I have 2FA enabled so need a token. Do yourself a favor, please enable 2FA regardless