Create a CODEOWNERS-based PR approval workflow#6185
Open
jonathansick wants to merge 1 commit intomainfrom
Open
Create a CODEOWNERS-based PR approval workflow#6185jonathansick wants to merge 1 commit intomainfrom
jonathansick wants to merge 1 commit intomainfrom
Conversation
d0adc41 to
4aa0b01
Compare
This workflow and associated codeowner_check.py script implements CODEOWNERS-based PR checking in a way that we couldn't achieve with GitHub's built-in branch rulesets. In short, this workflow checks if any changed files in a PR have associated a code owners group. If they do, and the PR creator is a member of the group, then the check is approved. If they aren't an owner, then a review with an approval from that group is required to get a success check. If CODEOWNERS does not exist, or the files don't have stated owners, then a commit check is also a success. This workflows needs a GitHub App to provide a token with org:read, statuses:write, and pull_request:read permissions.
4aa0b01 to
8cd161f
Compare
Member
|
Great. Do you think we should test it on phalanx or something more lowkey first? |
Member
Author
|
@frossie as long as we don't make the codeowner-approval check required then it doesn't have any affect whether it passes or fails. So in a way running it in the background for a week without making it a required check for merge could be useful to validate use cases. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This workflow and associated codeowner_check.py script implements
CODEOWNERS-based PR checking in a way that we couldn't achieve with
GitHub's built-in branch rulesets. In short, this workflow checks if any
changed files in a PR have associated a code owners group. If they do,
and the PR creator is a member of the group, then the check is approved.
If they aren't an owner, then a review with an approval from that
group is required to get a success check. If CODEOWNERS does not exist,
or the files don't have stated owners, then a commit check is also a
success.
This workflows needs a GitHub App to provide a token with org:read,
statuses:write, and pull_request:read permissions.