/code-review

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

Primary LanguageRuby

Code review

Code Climate Build Status 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

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 <no-reply@hyper.no>).
  • 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. john@work.com,jane@work.com).
  • 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.

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.