this repository is originally forked from https://github.com/yshnb/github-stat but with different design purpose. except statistics analysis of the numbers of merged/LGTM'ed/NonLGTM'ed(open) PRs in specified repos for specified user(s) , lots of other features are planed.
go get -u github.com/google/go-github/github
go get -u github.com/mgutz/ansi
go get -u golang.org/x/oauth2
go get -u github.com/olekukonko/tablewriter
go get -u github.com/BurntSushi/toml
git clone https://github.com/bruceauyeung/github-contrib-stats
cd ./github-contrib-stats
cp config.toml.dist config.toml
- fill in
accessToken
field inconfig.toml
, you can generate one from https://github.com/settings/tokens (make sure repo scope is checked) - fill in other fields in
config.toml
.
After, you can run the below command
$ go run main.go
the outputs may look like the following:
metrics: pull request stat analysis
kubernetes/charts : listing open pull requests
kubernetes/charts : listing closed pull requests
......(some outputs ignored)
+--------------+------------+----------------+-------------+----------------+
| USER NAME | MERGED PRS | MERGED COMMITS | LGTM'ED PRS | NONLGTM'ED PRS |
+--------------+------------+----------------+-------------+----------------+
| bruceauyeung | 10 | 11 | 0 | 6 |
| tanshanshan | 8 | 8 | 0 | 7 |
+--------------+------------+----------------+-------------+----------------+