-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Automatically Add Reviewers to Pull Requests #5948
Conversation
54d49db
to
b70a97b
Compare
The commit message for the workflow needs tweaking. I added two changes below highlighting using "**".
|
b70a97b
to
2f0d919
Compare
Adds a new `-g` parameter so that output will also include the GitHub username. This change uses a simple regular expression as opposed to directly returning the original line from the file to make the extraction of GitHub usernames more robust to other changes on the line in the maintainers text file. Signed-off-by: Michael Kubacki <[email protected]>
2f0d919
to
810310c
Compare
Going to make another small change before this is ready. |
Adds a script that provides GitHub API helpers for workflows and other GitHub automation in the repository. Signed-off-by: Michael Kubacki <[email protected]>
810310c
to
fe459f9
Compare
Done |
fe459f9
to
39b89b4
Compare
1cd7600
to
69c0bfb
Compare
Adds a new GitHub workflow to automatically add reviewers to pull requests when they are opened, reopened, synchronized, and if a draft pull request is marked as ready for review. The workflow will not run on draft pull requests. The workflow is meant to be simple to understand and modify, relying on existing logic in GetMaintainer.py to determine the relevant reviewers and using simple Python GitHub REST API wrappers with the default GitHub token for authentication. Future changes may optimize the workflow. Signed-off-by: Michael Kubacki <[email protected]>
69c0bfb
to
5fe80a5
Compare
Description
A series of changes to automate reviewers being added to pull requests in edk2.
Long term, it is preferred to exclusively depend upon GitHub Code Owners. This
PR is meant to provide an immediate solution to adding reviewers to PRs while
opens around CODEOWNERS are closed.
This wiki page has some details about the workflow Automatic Pull Request Reviewer Details.
BaseTools/GetMaintainer.py: Add GitHub username argument
Adds a new
-g
parameter so that output will also include the GitHubusername.
This change uses a simple regular expression as opposed to directly
returning the original line from the file to make the extraction of
GitHub usernames more robust to other changes on the line in the
maintainers text file.
.github: Add GitHub python script
Adds a script that provides GitHub API helpers for automation scripts
in the repository.
.github/workflows/request-reviews.yml: Add workflow
Adds a new GitHub workflow to automatically add reviewers to pull
requests when they are opened, reopened, synchronized, and if a draft
pull request is marked as ready for review. The workflow will not
run on draft pull requests.
The workflow is meant to be simple to understand and modify, relying
on existing logic in GetMaintainer.py to determine the relevant
reviewers and using simple Python GitHub REST API wrappers with the
default GitHub token for authentication.
Future changes may optimize the workflow.
How This Was Tested
Integration Instructions
You can see this workflow running in the tianocore/edk2 repo (for this PR) here.