Created
May 8, 2022 21:24
-
-
Save ardydedase/b28bae3e883331e78fc5829564b4eb14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {danger, warn, fail} from 'danger'; | |
const reviewLargePR = () => { | |
const bigPRThreshold = 300; | |
if (danger.github.pr.additions + danger.github.pr.deletions > bigPRThreshold) { | |
warn(`:exclamation: Pull Request size seems relatively large. If Pull Request contains multiple changes, split each into separate PR for faster, easier review.`); | |
} | |
} | |
const ensurePRHasAssignee = () => { | |
// Always ensure we assign someone, so that our Slackbot can do its work correctly | |
if (danger.github.pr.assignee === null) { | |
fail("Please assign someone to merge this PR, and optionally include people who should review.") | |
} | |
} | |
reviewLargePR(); | |
ensurePRHasAssignee(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment