Danger checks for all of arquivei projects. Feel free to use these conventions. :-)
This usage is exemplified for bitbucket pipelines, for more information about others pipelines access: DangerJS.
- Install
@arquivei/danger
yarn add @arquivei/danger --dev
- Create
dangerfile.js
on root of project
import arquiveiDanger from '@arquivei/danger'
arquiveiDanger()
- Add danger on validate step of
bitbucket-pipelines.yml
script:
- yarn
- yarn danger ci
- [...]
- Install danger as dev dependencies
yarn add danger -D
- Install @arquivei/danger
npm install @arquivei/danger --dev
- Create
dangerfile.js
on root of project
import arquiveiDanger from '@arquivei/danger'
arquiveiDanger()
- Add danger script
package.json
"scripts": {
"[...]"
"danger": "danger ci"
}
- Add danger on validate step of
bitbucket-pipelines.yml
script:
- npm install
- npm run danger
- [...]
- Install danger as dev dependencies
npm install danger -D
To run DangerJS in the Bitbucket pipeline it is necessary to configure two environment variables:
- DANGER_BITBUCKETCLOUD_OAUTH_KEY
- DANGER_BITBUCKETCLOUD_OAUTH_SECRET
The value of the variables is confidential for each company.
You can validate on your local if danger is working as expected:
//yarn
yarn danger pr <pr-link>
//npm
npm run danger pr <pr-link>.
Danger runs during your CI process, and gives teams the chance to automate common code review chores.
More information about DangerJS: https://danger.systems/js/