The project is in a healthy, maintained state
Create a leaderboard for code review in your repository or organization
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.8
~> 8.1
~> 2.3
~> 0.3
 Project Readme

Code Review Leaderboard

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.

Examples

Screenshot 2024-02-10 at 21 08 05

Reviews are counted by the following rules:

  1. Completed within the last 30 days
  2. Multiple comments only count once.
  3. If a reviewer both approves/rejects a pull request and comments, the comments do not count extra.
  4. Approvals and rejections always count.

For a repository of 718 repositories and 526 reviews, the script takes roughly 1 minute.

Installation

Install the gem:

$ gem install code_review_leaderboard

Usage

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

Configuration

You can either configure the gem via command line arguments or by setting environment variables. Command line arguments take precedence.

Development

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.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/markokajzer/code-review-leaderboard.