All Projects → hyperoslo → code-review

hyperoslo / code-review

Licence: other
A simple application that selects a random commit for code review.

Programming Languages

ruby
36898 projects - #4 most used programming language
CSS
56736 projects
HTML
75241 projects

Code review

Build Status Code Climate Coverage Status

We ship a lot of code at Hyper, and we're proud of every bit of it. We built this simple application to select random commits for review whenever we push code so we can show it off or ridicule @espenhogbakk whenever he version controls his passwords.

Example

Usage

Create a post-receive hook to hit your code review application and specify the service you're using in the service parameter (e.g. http://review.example.org/?service=github).

GitHub

Set the content type for your push-event hook to application/x-www-form-urlencoded. Other content types, such as application/json, are currently not supported.

On creation of a new webhook, GitHub will send a ping event. This is currently not handled appropriately, but its failure can be safely ignored.

Configuration

The application looks to the following environment variables for its configuration:

  • SENDER - A string describing the sender's name and email address (e.g Hyper <[email protected]>).
  • ODDS - A string of the format "x:y" that describes the likelihood that a commit will be selected for review (e.g. 1:25).
  • REVIEWERS - A comma-separated list of e-mail addresses that code reviews may be addressed to (e.g. [email protected],[email protected]).
  • SMTP_HOST - A string describing the SMTP host.
  • SMTP_PORT - A string describing the SMTP port.
  • SMTP_DOMAIN - A string describing the SMTP domain.
  • SMTP_USERNAME - A string describing the SMTP username.
  • SMTP_PASSWORD - A string describing the SMTP password.
  • GITLAB_PRIVATE_TOKEN - A string describing a GitLab private token.
  • GUARANTEED_REVIEW - A string that will automatically qualify commits for review (defaults to please review).

Control over branches with post-receive hook URL params:

Development

Install the dependencies:

$ bundle install

Run the tests:

$ bundle exec rake test

Run the server:

$ bundle exec rackup

Credits

Hyper made this. We're a digital communications agency with a passion for good code, and if you're using this application we probably want to hire you.

License

Code review is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].