This is a tool that automates the review of pull requests for Rails project on GitHub.
Add this line to your application's Gemfile:
gem 'review-tools', require: false, group: :development
And then execute:
$ bundle
Or install it yourself as:
$ gem install review-tools
- See the pull request page on GitHub. You will see like these lines.
Open hgwr wants to merge 4 commits into master from dev
-
Copy
into master from dev
and paste likerun_review into master from dev
to terminal. -
Then, Run
run_review into master from dev
. It executes these operaitons.
git checkout ...
- Preparing environments. (e.g. Database migrations)
- Run tests
- If you are using simplecov, you can see coverages of modified files.
You can put custom shell scripts in ~/.config/review-tools.yml
.
For example:
additional_preparation: |
rm -rf node_modules && yarn
additional_db_preparation: |
bundle exec bin/rails db:some:your:task
additional_test_tasks: |
if [ ! -z "${do_frontend_test:-}" ]; then
npm test
eslint app/assets/javascripts/**/*
fi
Bug reports and pull requests are welcome on GitHub at https://github.com/hgwr/review-tools. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Review::Tools project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.