dangerjs-wrapper
Version:
Plugin to Apply cultural rules during your CI process.
52 lines (37 loc) • 1.15 kB
Markdown
# Dangerjs-wrapper
Apply cultural rules during your CI process.
[](https://github.com/semantic-release/semantic-release)
> Plugin to Apply cultural rules during your CI process.
## Usage
- Install:
```sh
npm i -D dangerjs-wrapper
```
- Create a `dangerfile.js`
- Create the config file following this interface:
````typescript
interface DangerConfig {
giphyApiKey: string
minReviewersRequired: number
ticketLinkRegExp: RegExp
changedFilesLimit: number
testFilesRegExp?: RegExp
docFilesRegExp?: RegExp
}
````
- Call the function `checkPullRequest` passing the config as a param
```js
const { checkPullRequest } = require('dangerjs-wrapper')
const dangerConfig = {
giphyApiKey: 'irrelevant',
docFilesRegExp: /./g,
changedFilesLimit: 4,
minReviewersRequired: 2,
ticketLinkRegExp: /https:\/\/dev.example.com/g,
}
checkPullRequest(dangerConfig)
```
## Changelog
See the GitHub [release history](https://github.com/guidesmiths/dangerjs-wrapper/releases).
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).