-
Notifications
You must be signed in to change notification settings - Fork 117
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
feat: ping reviewers based on which files were changed #265
Conversation
Still need to add tests, but I'm looking for feedback on the implementation (using a YAML file, fetching from core, etc.). This has been discussed already in nodejs/node#33895 and nodejs/node#33984 (and a couple old pull requests where CODEOWNERS were first introduced but then removed because of the GitHub limitations mentioned above). |
Introduces a custom OWNERS file, which is intended to be handled by `github-bot` as a way to work around GitHub CODEOWNERS limitation which prevents teams without explicit write access from being added as reviewers. Ref: nodejs#33984 Ref: nodejs/github-bot#265
Conceptually looks good to me 👍 The fact that the definition lives inside the node repo is surely a step in a more sustainable direction going forward. I'm not opinionated about the format and naming of |
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.
👍
lib/node-repo.js
Outdated
debug(`Fetching OWNERS on ${url}`) | ||
request(url, (err, res, body) => { | ||
if (err || !res || res.statusCode >= 400) { | ||
return options.logger.error(err, 'Error retrieving OWNERS') |
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.
Perhaps, also log res
(or at least res.statusCode
) in this case?
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.
Agreed, but can be done in a follow up PR (so we don't block the PR)
2befe4b
to
8d158a9
Compare
Previous version was a merge-conflict show, it was easier for me to go revert the changes and copy them manually. I added all new functions after current function to avoid any future conflicts if this doesn't land soon. Main changes:
|
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.
Rubberstamp lgtm, let's try this.
@phillipj do you want to take another look before we land this? Was hoping to land it this week (but if you want to take another look and don't have time this week we can postpone it) |
Using .github/CODEOWNERS, `github-bot` will ping the appropriate teams based on which files were changed in a Pull Request. This feature is inteded to work around GitHub's limitation which prevents teams without explicit write access from being added as reviewers (thus preventing the vast majority of teams in the org from being used on GitHub's CODEOWNERS feature). Ref: nodejs/node#33984
@phillipj feel free to ping me if you have any comments, suggestions or concerns on this PR. I can send a patch addressing those or we can revert if necessary. |
Gotcha! Sorry for the late reply, your ping a few days ago drowned in my
mailbox somehow.
…On Fri, 7 Aug 2020 at 21:09, mary marchini ***@***.***> wrote:
@phillipj <https://github.com/phillipj> feel free to ping me if you have
any comments, suggestions or concerns on this PR. I can send a patch
addressing those or we can revert if necessary.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJMWE7ASGJNCN3APUE3IPLR7RGM7ANCNFSM4ONAGOOQ>
.
|
A recent feature was added to github-bot to ping codeowners defined on the CODEOWNERS file even if the team doesn't have write permission to the repository. That means we can enable codeowners everywhere in the repository. Ref: nodejs/github-bot#265 Fix: nodejs#33984
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.
Belated LGTM, nice one 💯
A recent feature was added to github-bot to ping codeowners defined on the CODEOWNERS file even if the team doesn't have write permission to the repository. That means we can enable codeowners everywhere in the repository. Ref: nodejs/github-bot#265 Fix: #33984 PR-URL: #34670 Fixes: #33984 Refs: nodejs/github-bot#265 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
A recent feature was added to github-bot to ping codeowners defined on the CODEOWNERS file even if the team doesn't have write permission to the repository. That means we can enable codeowners everywhere in the repository. Ref: nodejs/github-bot#265 Fix: #33984 PR-URL: #34670 Fixes: #33984 Refs: nodejs/github-bot#265 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
A recent feature was added to github-bot to ping codeowners defined on the CODEOWNERS file even if the team doesn't have write permission to the repository. That means we can enable codeowners everywhere in the repository. Ref: nodejs/github-bot#265 Fix: #33984 PR-URL: #34670 Fixes: #33984 Refs: nodejs/github-bot#265 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
A recent feature was added to github-bot to ping codeowners defined on the CODEOWNERS file even if the team doesn't have write permission to the repository. That means we can enable codeowners everywhere in the repository. Ref: nodejs/github-bot#265 Fix: #33984 PR-URL: #34670 Fixes: #33984 Refs: nodejs/github-bot#265 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
A recent feature was added to github-bot to ping codeowners defined on the CODEOWNERS file even if the team doesn't have write permission to the repository. That means we can enable codeowners everywhere in the repository. Ref: nodejs/github-bot#265 Fix: #33984 PR-URL: #34670 Fixes: #33984 Refs: nodejs/github-bot#265 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Using a custom OWNERS file,
github-bot
will ping the appropriate teamsbased on which files were changed in a Pull Request. This feature is
inteded to work around GitHub's limitation which prevents teams without
explicit write access from being added as reviewers (thus preventing the
vast majority of teams in the org from being used on GitHub's CODEOWNERS
feature).
The OWNERS file is a yaml file (to simplify parsing) composed of
key-value paris. The key is always a string and represents a glob of the
changed files. The value is always an array of strings, and each string
is a team to be pinged.
Ref: nodejs/node#33984
Ref: nodejs/node#34150