{"id":26197286,"url":"https://github.com/mongoid/danger","last_synced_at":"2025-04-15T03:55:42.951Z","repository":{"id":56851209,"uuid":"66579694","full_name":"mongoid/danger","owner":"mongoid","description":"Shared PR linting for the Mongoid organization.","archived":false,"fork":false,"pushed_at":"2022-08-18T22:15:07.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-24T16:04:44.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongoid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-25T17:39:23.000Z","updated_at":"2022-08-18T19:54:09.000Z","dependencies_parsed_at":"2022-08-20T13:10:54.355Z","dependency_job_id":null,"html_url":"https://github.com/mongoid/danger","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoid%2Fdanger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoid%2Fdanger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoid%2Fdanger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongoid%2Fdanger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongoid","download_url":"https://codeload.github.com/mongoid/danger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660104,"owners_count":21141243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-12T02:25:24.488Z","updated_at":"2025-04-15T03:55:42.935Z","avatar_url":"https://github.com/mongoid.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Danger\n\n[Danger](http://danger.systems) runs during Mongoid projects' CI process, and gives you a chance to automate common code review chores.\n\n[![Build Status](https://github.com/mongoid/danger/actions/workflows/test.yml/badge.svg)](https://github.com/mongoid/danger/actions)\n\n### Setup\n\nEnable Danger for a project within the [mongoid organization](https://github.com/mongoid). This involves adding a token in Travis-CI and making some build script changes. See [mongoid-compatibility#3](https://github.com/mongoid/mongoid-compatibility/pull/3) for a complete example.\n\n#### Set DANGER_GITHUB_API_TOKEN in Travis-CI\n\nIn 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](https://github.com/mongoid-bot) user, look in a recent build for this project for its value.\n\n#### Add Danger to Gemfile\n\nAdd `mongoid-danger` to `Gemfile`.\n\n```ruby\ngem 'mongoid-danger', '~\u003e 0.1.0', require: false\n```\n\n#### Add Dangerfile\n\nCommit a `Dangerfile`, eg. [mongoid-compatibility's Dangerfile](https://github.com/mongoid/mongoid-compatibility/blob/master/Dangerfile).\n\n#### Add Danger to GitHub Actions\n\nAdd `.github/workflows/danger.yml`, eg. [mongoid-compatibility's danger.yml](https://github.com/mongoid/mongoid-compatibility/blob/master/.github/workflows/danger.yml).\n\n```yaml\nname: PR Linter\non: [pull_request]\njobs:\n  danger:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - uses: ruby/setup-ruby@v1\n        with:\n          ruby-version: 2.6\n          bundler-cache: true\n      - run: |\n          # the personal token is public, this is ok, base64 encode to avoid tripping Github\n          TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode)\n          DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose\n```\n\n#### Add Danger to Travis-CI\n\nAdd Danger to `.travis.yml`, eg. [mongoid-compatibility's Travis.yml](https://github.com/mongoid/mongoid-compatibility/blob/master/.travis.yml).\n\n```yaml\nmatrix:\n  include:\n    - rvm: 2.3.1\n      script:\n        - bundle exec danger\n```\n\n#### Commit via a Pull Request\n\nTo test things out, make a pull request without CHANGELOG.md changes. Iterate until green.\n\n## License\n\nMIT License. See [LICENSE](LICENSE) for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoid%2Fdanger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoid%2Fdanger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoid%2Fdanger/lists"}