Repository navigation
Conversation
Collaborator
Add two rulesets, both starting in evaluate mode: - protect-tags: on all tags, block creation, update, deletion and force-push for everyone except repo admins, and require names to match ^v\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$. Targeting all tags, not only v*, also keeps ad-hoc tags off the repo. - protect-release-branches: on release-* branches, the same rules as protect-main (no deletion or force-push, PR with 1 approval, stale approvals dismissed, build-and-test). Run go.yml on release-* branches too, so build-and-test reports on release-branch PRs and the required check can pass. Document the branch and tag naming rules in docs/rulesets.md. Part of #547.
Member
|
Don't merge this. We don't want to dismiss approvals. Every contributor is a trusted contributor in AX. |
Collaborator
|
Sounds good, let's not dismiss approvals. @MushuEE could you pull the tag/release-branch protection (#574, it landed in this branch rather than main) into its own PR, and update the CONTRIBUTING line that says a push needs fresh approval? Then we can close this one. Still need the admin bypass in protect-main.json before I apply. |
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
Sets
dismiss_stale_reviews_on_push: trueonprotect-main, so pushing a commit to an approved PR dismisses the approval. CONTRIBUTING.md already says this happens; now the ruleset enforces it.Stacked on #572. Review only the top commit.
Changes
.github/rulesets/protect-main.json:dismiss_stale_reviews_on_push: false→true.Decision:
require_last_push_approvalThis PR leaves
require_last_push_approvalatfalse. Setting it totruewould also block a reviewer from approving and then pushing their own commit, but a maintainer who pushes a fix to someone else's PR would then need a third person to approve. Comment here if you'd rather turn it on, and I'll add it to this PR.After merge (repo admin)
hack/apply-rulesets.sh --dry-run, thenhack/apply-rulesets.sh.Fixes #570.