UNPKG

danger-plugin-pull-request

Version:

A Danger plugin to verify the completion of a pull request

15 lines (14 loc) 1.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.wip = exports.deleteSourceBranchhNotChecked = exports.squashNotChecked = exports.refactorCode = exports.bigPR = exports.titleDoeNotMatch = exports.descriptionNotLongEnough = exports.noDescription = exports.noAssignee = void 0; const pullReqName = () => (danger.gitlab ? 'merge request' : 'pull request'); exports.noAssignee = () => `Please assign someone to merge this ${pullReqName()}, and optionally include people who should review.`; exports.noDescription = () => `This ${pullReqName()} does not have a description.`; exports.descriptionNotLongEnough = (minimumLength) => `This ${pullReqName()} description is too short. It should be contain at least ${minimumLength} characters.`; exports.titleDoeNotMatch = (pattern) => `This ${pullReqName()} title does not match the following pattern: ${pattern instanceof RegExp ? `\`${pattern}\`` : pattern}`; exports.bigPR = () => `This ${pullReqName()} size seems relatively large. If ${pullReqName()} contains multiple changes, split each into separate ${pullReqName()} will helps faster, easier review.`; exports.refactorCode = () => '🎉 Yay! Cheers for some code refactoring!'; exports.squashNotChecked = () => 'Merge squash should checked'; exports.deleteSourceBranchhNotChecked = () => 'Delete source branch should checked'; exports.wip = () => `This ${pullReqName()} marked as work in progress (WIP)`;