0.0
Low commit activity in last 3 years
No release in over a year
Packages a Dangerfile to be used with Danger for projects within the Mongoid community.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 8.6.1
 Project Readme

Danger

Danger runs during Mongoid projects' CI process, and gives you a chance to automate common code review chores.

Build Status

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 GitHub Actions

Add .github/workflows/danger.yml, eg. mongoid-compatibility's danger.yml.

name: PR Linter
on: [pull_request]
jobs:
  danger:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
          bundler-cache: true
      - run: |
          # the personal token is public, this is ok, base64 encode to avoid tripping Github
          TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode)
          DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose

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.