@@ -18,7 +18,6 @@ import { danger, fail, markdown, message, warn } from 'danger';
18
18
// Fails if the description is too short.
19
19
if ( ! danger . github . pr . body || danger . github . pr . body . length < 10 ) {
20
20
fail ( ':grey_question: This pull request needs a description.' ) ;
21
- markdown ( '@facebook-github-bot label Needs more information' ) ;
22
21
}
23
22
24
23
// Warns if the PR title contains [WIP]
@@ -44,7 +43,6 @@ if (!includesTestPlan) {
44
43
const title = ':clipboard: Test Plan' ;
45
44
const idea = 'This PR appears to be missing a Test Plan.' ;
46
45
warn ( `${ title } - <i>${ idea } </i>` ) ;
47
- markdown ( '@facebook-github-bot label Needs more information' ) ;
48
46
}
49
47
50
48
// Regex looks for given categories, types, a file/framework/component, and a message - broken into 4 capture groups
@@ -57,32 +55,30 @@ if (!includesReleaseNotes) {
57
55
const title = ':clipboard: Release Notes' ;
58
56
const idea = 'This PR appears to be missing Release Notes.' ;
59
57
warn ( `${ title } - <i>${ idea } </i>` ) ;
60
- markdown ( '@facebook-github-bot label Needs more information' ) ;
61
58
} else if ( ! correctlyFormattedReleaseNotes ) {
62
59
const title = ':clipboard: Release Notes' ;
63
60
const idea = 'This PR may have incorrectly formatted Release Notes.' ;
64
61
warn ( `${ title } - <i>${ idea } </i>` ) ;
65
- markdown ( '@facebook-github-bot label Needs more information' ) ;
66
62
} else if ( releaseNotesCaptureGroups ) {
67
63
const category = releaseNotesCaptureGroups [ 1 ] . toLowerCase ( ) ;
68
64
69
65
// Use Release Notes to Tag PRs appropriately
70
- if ( category === 'ios' ) {
71
- markdown ( '@facebook-github-bot label iOS' ) ;
72
- }
66
+ // if (category === 'ios' ){
67
+ // markdown('@facebook-github-bot label iOS');
68
+ // }
73
69
74
- if ( category === 'android' ) {
75
- markdown ( '@facebook-github-bot label Android' ) ;
76
- }
70
+ // if (category === 'android' ){
71
+ // markdown('@facebook-github-bot label Android');
72
+ // }
77
73
}
78
74
79
75
// Tags PRs that have been submitted by a core contributor.
80
76
// TODO: Switch to using an actual MAINTAINERS file.
81
77
const taskforce = fs . readFileSync ( './IssueCommands.txt' , 'utf8' ) . split ( '\n' ) [ 0 ] . split ( ':' ) [ 1 ] ;
82
78
const isSubmittedByTaskforce = includes ( taskforce , danger . github . pr . user . login ) ;
83
- if ( isSubmittedByTaskforce ) {
84
- markdown ( '@facebook-github-bot label Core Team' ) ;
85
- }
79
+ // if (isSubmittedByTaskforce) {
80
+ // markdown('@facebook-github-bot label Core Team');
81
+ // }
86
82
87
83
// Tags big PRs
88
84
var bigPRThreshold = 600 ;
@@ -91,14 +87,14 @@ if (danger.github.pr.additions + danger.github.pr.deletions > bigPRThreshold) {
91
87
const idea = `This PR is extremely unlikely to get reviewed because it touches ${ danger . github . pr . additions + danger . github . pr . deletions } lines.` ;
92
88
warn ( `${ title } - <i>${ idea } </i>` ) ;
93
89
94
- markdown ( '@facebook-github-bot large-pr' ) ;
90
+ // markdown('@facebook-github-bot large-pr');
95
91
}
96
92
if ( danger . git . modified_files + danger . git . added_files + danger . git . deleted_files > bigPRThreshold ) {
97
93
const title = ':exclamation: Big PR' ;
98
94
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.` ;
99
95
warn ( `${ title } - <i>${ idea } </i>` ) ;
100
96
101
- markdown ( '@facebook-github-bot large-pr' ) ;
97
+ // markdown('@facebook-github-bot large-pr');
102
98
}
103
99
104
100
// Warns if the bots whitelist file is updated.
0 commit comments