Skip to content

Commit b973fe4

Browse files
hramosfacebook-github-bot
authored andcommitted
Stop using GitHub bot commands for now
Summary: Closes #17929 Differential Revision: D6953331 Pulled By: hramos fbshipit-source-id: d7b50b18a2c2e5826ed2af5f5ef08ed9aa2878bf
1 parent 488b682 commit b973fe4

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

bots/dangerfile.js

+11-15
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { danger, fail, markdown, message, warn } from 'danger';
1818
// Fails if the description is too short.
1919
if (!danger.github.pr.body || danger.github.pr.body.length < 10) {
2020
fail(':grey_question: This pull request needs a description.');
21-
markdown('@facebook-github-bot label Needs more information');
2221
}
2322

2423
// Warns if the PR title contains [WIP]
@@ -44,7 +43,6 @@ if (!includesTestPlan) {
4443
const title = ':clipboard: Test Plan';
4544
const idea = 'This PR appears to be missing a Test Plan.';
4645
warn(`${title} - <i>${idea}</i>`);
47-
markdown('@facebook-github-bot label Needs more information');
4846
}
4947

5048
// Regex looks for given categories, types, a file/framework/component, and a message - broken into 4 capture groups
@@ -57,32 +55,30 @@ if (!includesReleaseNotes) {
5755
const title = ':clipboard: Release Notes';
5856
const idea = 'This PR appears to be missing Release Notes.';
5957
warn(`${title} - <i>${idea}</i>`);
60-
markdown('@facebook-github-bot label Needs more information');
6158
} else if (!correctlyFormattedReleaseNotes) {
6259
const title = ':clipboard: Release Notes';
6360
const idea = 'This PR may have incorrectly formatted Release Notes.';
6461
warn(`${title} - <i>${idea}</i>`);
65-
markdown('@facebook-github-bot label Needs more information');
6662
} else if (releaseNotesCaptureGroups) {
6763
const category = releaseNotesCaptureGroups[1].toLowerCase();
6864

6965
// 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+
// }
7369

74-
if (category === 'android' ){
75-
markdown('@facebook-github-bot label Android');
76-
}
70+
// if (category === 'android' ){
71+
// markdown('@facebook-github-bot label Android');
72+
// }
7773
}
7874

7975
// Tags PRs that have been submitted by a core contributor.
8076
// TODO: Switch to using an actual MAINTAINERS file.
8177
const taskforce = fs.readFileSync('./IssueCommands.txt', 'utf8').split('\n')[0].split(':')[1];
8278
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+
// }
8682

8783
// Tags big PRs
8884
var bigPRThreshold = 600;
@@ -91,14 +87,14 @@ if (danger.github.pr.additions + danger.github.pr.deletions > bigPRThreshold) {
9187
const idea = `This PR is extremely unlikely to get reviewed because it touches ${danger.github.pr.additions + danger.github.pr.deletions} lines.`;
9288
warn(`${title} - <i>${idea}</i>`);
9389

94-
markdown('@facebook-github-bot large-pr');
90+
// markdown('@facebook-github-bot large-pr');
9591
}
9692
if (danger.git.modified_files + danger.git.added_files + danger.git.deleted_files > bigPRThreshold) {
9793
const title = ':exclamation: Big PR';
9894
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.`;
9995
warn(`${title} - <i>${idea}</i>`);
10096

101-
markdown('@facebook-github-bot large-pr');
97+
// markdown('@facebook-github-bot large-pr');
10298
}
10399

104100
// Warns if the bots whitelist file is updated.

0 commit comments

Comments
 (0)