A Danger plugin to verify the completion of a pull request
npm install danger-plugin-pull-request


> A Danger plugin to verify the completion of a pull request. Currently support GitHub and GitLab.
Install:
``sh`
yarn add danger-plugin-pull-request --dev
At a glance:
_dangerfile.js_
`js
import * as pullRequest from 'danger-plugin-pull-request'
pullRequest.checkAssignees();
pullRequest.checkDescription(1000);
pullRequest.checkTitle(/^\[[A-Za-z]+-\d+\]/);
pullRequest.checkPRSize(50);
pullRequest.checkMergeSquashChecked(); // GitLab only
pullRequest.checkDeleteSourceBranchChecked(); // GitLab only
`
Arguments:
- [reporter] (_Function_): The reporter (message, warn or fail) to call if the pull request has no assignees.fail
- Default value:
Arguments:
- minimumLength (_Number_): The minimum length for a description to be valid.reporter
- [] (_Function_): The reporter (message, warn or fail) to call if the pull request's description is too short.fail
- Default value:
Arguments:
- pattern (_RegExp_): The pattern to test the title with.patternMessage
- (_String_): Readable pattern message for reporter message.reporter
- [] (_Function_): The reporter (message, warn or fail) to call if the pull request's title is invalid.fail
- Default value:
Arguments:
- maxSize (_Number_): The maximum changed files count to be valid.reporter
- [] (_Function_): The reporter (message, warn or fail) to call if the pull request's description is too short.fail
- Default value:
Arguments:
- [reporter] (_Function_): The reporter (message, warn or fail) to call if the pull request's description is too short.fail
- Default value:
Arguments:
- [reporter] (_Function_): The reporter (message, warn or fail) to call if the pull request's description is too short.fail`
- Default value:
See the GitHub release history.
See CONTRIBUTING.md.