@@ -45,7 +45,7 @@ if (!includesTestPlan) {
45
45
46
46
// Regex looks for given categories, types, a file/framework/component, and a message - broken into 4 capture groups
47
47
const releaseNotesRegex = / \[ ( A N D R O I D | C L I | D O C S | G E N E R A L | I N T E R N A L | I O S | T V O S | W I N D O W S ) \] \s * ?\[ ( B R E A K I N G | B U G F I X | E N H A N C E M E N T | F E A T U R E | M I N O R ) \] \s * ?\[ ( .* ) \] \s * ?\- \s * ?( .* ) / ig;
48
- const includesReleaseNotes = danger . github . pr . body . toLowerCase ( ) . includes ( 'release notes' ) ;
48
+ const includesReleaseNotes = danger . github . pr . body && danger . github . pr . body . toLowerCase ( ) . includes ( 'release notes' ) ;
49
49
const correctlyFormattedReleaseNotes = releaseNotesRegex . test ( danger . github . pr . body ) ;
50
50
const releaseNotesCaptureGroups = releaseNotesRegex . exec ( danger . github . pr . body ) ;
51
51
@@ -86,24 +86,14 @@ if (danger.github.pr.additions + danger.github.pr.deletions > bigPRThreshold) {
86
86
warn ( `${ title } - <i>${ idea } </i>` ) ;
87
87
88
88
// markdown('@facebook-github-bot large-pr');
89
- }
90
- if ( danger . git . modified_files + danger . git . added_files + danger . git . deleted_files > bigPRThreshold ) {
89
+ } else if ( danger . git . modified_files + danger . git . added_files + danger . git . deleted_files > bigPRThreshold ) {
91
90
const title = ':exclamation: Big PR' ;
92
91
const idea = `This PR is extremely unlikely to get reviewed because it touches ${ danger . git . modified_files + danger . git . added_files + danger . git . deleted_files } files.` ;
93
92
warn ( `${ title } - <i>${ idea } </i>` ) ;
94
93
95
94
// markdown('@facebook-github-bot large-pr');
96
95
}
97
96
98
- // Warns if the bots whitelist file is updated.
99
- const issueCommandsFileModified = includes ( danger . git . modified_files , 'bots/IssueCommands.txt' ) ;
100
- if ( issueCommandsFileModified ) {
101
- const title = ':exclamation: Bots' ;
102
- const idea = 'This PR appears to modify the list of people that may issue ' +
103
- 'commands to the GitHub bot.' ;
104
- warn ( `${ title } - <i>${ idea } </i>` ) ;
105
- }
106
-
107
97
// Warns if the PR is opened against stable, as commits need to be cherry picked and tagged by a release maintainer.
108
98
// Fails if the PR is opened against anything other than `master` or `-stable`.
109
99
const isMergeRefMaster = danger . github . pr . base . ref === 'master' ;
0 commit comments