Skip to content

Commit effb8ee

Browse files
committed
Add label support to REVIEWERS and NOTIFIED files.
This lets you specify rules like this: ``` allfiles: **/* @notifyme ``` And when we add the NOTIFIED section to the github PR, it will now say: ``` @notifyme (allfiles): file1 file2 file3 ``` (For rules without labels, the output is unchanged.) This is helpful for knowing _why_ you were being notified for a particular PR, since as we add more NOTIFIED rules it can get harder to tell. I added the support for REVIEWERS as well, since it was easy, though I'm not sure how useful it is there. While in the area, I couldn't help but clean up the existing code a bit, especially simplifying some of the regexp-parsing logic (at the cost of more parentheses in the regexp). Issue: https://khanacademy.atlassian.net/browse/FEI-5970 Test plan: yarn flow yarn jest
1 parent 6626012 commit effb8ee

File tree

7 files changed

+460
-402
lines changed

7 files changed

+460
-402
lines changed

.github/NOTIFIED

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Examples:
77
# This rule will notify @owner1 on changes to all files
88
# **/* @owner1
99

10+
# This rule will notify @owner1 on changes to all files, and the rule
11+
# has a label "allfiles", which will be included in the github PR info.
12+
# allfiles: **/* @owner1
13+
1014
# This rule will notify @owner1 and @Org/team1 on changes to all .js files
1115
# **/*.js @owner1 @Org/team1
1216

.github/REVIEWERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Examples:
77
# This rule will request @owner1 for review on changes to all files. This rule will also request @owner2 for a blocking review.
88
# **/* @owner1 @owner2!
99

10+
# This rule will request @owner1 for review on changes to all files, and the rule has a label "allfiles", which will be included in the github PR info.
11+
# allfiles: **/* @owner1
12+
1013
# This rule will request @owner1 and @Org/team1 for review on changes to all .js files
1114
# **/*.js @owner1 @Org/team1
1215

dist/index.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)