Repository navigation
fix(asf): give the main ruleset the review fields it needs - #2189
Merged
Merged
Conversation
asfyaml builds one pull-request rule from required_conversation_resolution and required_pull_request_reviews, and GitHub refuses that rule, and with it the whole ruleset, when the review fields are missing. The `main` ruleset was therefore never created after apache#2184 removed the classic protection. Add required_pull_request_reviews with zero required approvals, which keeps the approval requirement lifted; restoring it is now a change of the count to 1. Generated-by: Claude Opus 5
1 task done
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.
Summary
After #2184 merged,
mainhas no protection: the classic protection was removed, but themainruleset was never created (gh api repos/apache/magpie/rules/branches/mainreturns nothing), so PRs merge without their required checks.The asfyaml README states that when
required_conversation_resolutionis set,required_pull_request_reviewsmust be present as well. asfyaml builds a singlepull_requestrule from both, and without the review fields GitHub refuses that rule and the whole ruleset with it. The ruleset in #2184 set conversation resolution and left the reviews block commented out.This adds
required_pull_request_reviewswithrequired_approving_review_count: 0anddismiss_stale_reviews: false, so the approval requirement stays lifted as before. Restoring it is now a change of the count to1; the comment says so.Type of change
.asf.yaml)Test plan
required_conversation_resolutionandrequired_pull_request_reviews, as the asfyaml README requires.gh api repos/apache/magpie/rules/branches/mainlists themainruleset's rules (status checks, linear history, pull request, deletion, non-fast-forward), and a PR with a failing required check shows as blocked for non-bypassing users.🤖 Generated with Claude Code