Github stats cli
npm install github-stats-cliGithub CLI to fetch stats
```
$ npm install -g github-stats-cli
After installing the package generate a Github token with repo level access and set the environment variable
by using:
``
echo 'export GH_STATS_TOKEN=
This token will be used by the cli to interface with the Github API.
`
Usage: ghs [options]
Options:
-v, --version output the version number
-o, --org
-r, --repo
-u, --user
-n, --num
-f, --from
-t, --to
--reviews add flag to aggregate review data by author
-h, --help output usage information
Environment variables:
GH_STATS_TOKEN set export GH_STATS_TOKEN=
Examples:
Minimal usage - get PRs from facebook/react repo merged in last 7 days, paginate 10 at a time and save to ./prdata.csv:
$ ghs -o facebook -r react
Get PRs from facebook/react repo merged in last 7 days, paginate 20 at a time and save to ./prdata.csv:
$ ghs -o facebook -r react -n 20
Get PRs from facebook/react repo created on or after 2018-07-01 merged on or before 2018-09-30, paginate 20 at a time and save to ./prdata.csv:
$ ghs -o facebook -r react -n 20 -u bvaughn -f 2018-07-01 -t 2018-09-30
Get PRs data for number of PRs reviewed and comments added by author:
$ ghs -o facebook -r react -f 2018-07-01 -t 2018-09-30 --reviews
``