This is based on Danger and helps us automate our code-reviews. Everything is very opionated and aimed only for Rails.
Add this line to your application's Gemfile:
gem 'sep-danger'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sep-danger
After you've added gem to Gemfile, just add Dangerfile to root of your project with contents:
danger.import_dangerfile(gem: 'sep-danger')
-
Run linters on the code diff using pronto. By default the following linters are included:
- pronto-haml
- pronto-rails_best_practices
- pronto-rubocop
- pronto-stylelint with the standard stylelint config
- pronto-eslint_npm with typescript parser and the AirBnB styleguide
Any other pronto linters you have installed will also be ran
-
Ask for review using slack webhook (use the
SLACK_REVIEW_WEBHOOK
env var) unless the PR is a WIP or tests failed -
Link to issue in the pull request if the branch starts with an issue number (If you keep all issues in one repository, use the
DANGER_ISSUES_REPO
env variable)
- be sure to be in master branch
- Change version in version file
- run rake master_release
Yes, it so simple!
Automate code review process to maximize time on what matters.
Ideas for this, could be found in:
- Potential security checks -> https://github.com/brunofacca/zen-rails-security-checklist
- Improving our transition to more Functionality Style coding - improve checks for immutable object and/or data.
- Using ruby and rails best practices
Lead maintainer for this project is @dvdbng
The gem is available as open source under the terms of the MIT License.