Create a leaderboard of code reviewers for your repository or organization.
Find out who is the most active reviewer in your team, who is the most thorough, and who is the most critical.
Reviews are counted by the following rules:
- Completed within the last 30 days
- Multiple comments only count once.
- If a reviewer both approves/rejects a pull request and comments, the comments do not count extra.
- Approvals and rejections always count.
For a repository of 718 repositories and 526 reviews, the script takes roughly 1 minute.
Install the gem:
$ gem install code_review_leaderboard
To use the gem, you will need to provide a GitHub access token. You can create a new access token by following the instructions here. If you want to inspect the repositories of an organization, make sure the organization in question allows access to their repositories from personal access tokens. You can check that from https://github.com/organizations/<name>/settings/personal-access-tokens
.
To inspect the reviews of a single repository, run:
$ code_review_leaderboard --access_token ACCESS_TOKEN --repository REPOSITORY
You can also provide multiple repositories:
$ code_review_leaderboard --access_token ACCESS_TOKEN --repository REPOSITORY1 REPOSITORY2
Finally, you can also inspect the repositories of an organization:
$ code_review_leaderboard --access_token ACCESS_TOKEN --organization ORGANIZATION
You can either configure the gem via command line arguments or by setting environment variables. Command line arguments take precedence.
After checking out the repo, run bin/setup
to install dependencies. Then, run rspec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. You can then run it with bundle exec <executable>
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and the created tag, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/markokajzer/code-review-leaderboard.