-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add label support to REVIEWERS and NOTIFIED files. #89
Conversation
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
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much, and thanks for the clean-up!
My only feedback is to please add more examples, because the allfiles
example, in isolation, if I didn't know what I was looking at, my brain would think that it had to do with all the files specifically, as opposed to an example of how a label would work. If that makes sense. 😄
Also, does this only work with the file-matching part of Gerald or the regex matching too? If the latter, a regex of a regex, are there any cases where we would get false positives because of a colon? I think not, because probably it's looking for the regex to be surrounded by |
I've renamed |
(In the PR description. In the PR itself I have:
which seems pretty clear? But let me know if not. |
I mention this in the commit message. Regexps have to start with a (And definitely it works with both!) |
Summary:
This lets you specify rules like this:
And when we add the NOTIFIED section to the github PR, it will now say:
(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