Danger
Danger runs during Mongoid projects' CI process, and gives you a chance to automate common code review chores.
Setup
Enable Danger for a project within the mongoid organization. This involves adding a token in Travis-CI and making some build script changes. See mongoid-compatibility#3 for a complete example.
Set DANGER_GITHUB_API_TOKEN in Travis-CI
In Travis-CI, choose Settings and add DANGER_GITHUB_API_TOKEN
in Environment Variables. Tick the Display value in build log option to enable Danger in pull requests. Set the value to the API key for the mongoid-bot user, look in a recent build for this project for its value.
Add Danger to Gemfile
Add mongoid-danger
to Gemfile
.
gem 'mongoid-danger', '~> 0.1.0', require: false
Add Dangerfile
Commit a Dangerfile
, eg. mongoid-compatibility's Dangerfile.
Add Danger to Travis-CI
Add Danger to .travis.yml
, eg. mongoid-compatibility's Travis.yml.
matrix:
include:
- rvm: 2.3.1
script:
- bundle exec danger
Commit via a Pull Request
To test things out, make a pull request without CHANGELOG.md changes. Iterate until green.
License
MIT License. See LICENSE for details.