You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Combine the main rulesets into a single protect-main ruleset #548
To see the full policy for main, you have to read two rulesets.
The ruleset allows the merge method, but the repo settings disable merge commits (allow_merge_commit: false). The two disagree.
Proposal
Create one protect-main ruleset on ~DEFAULT_BRANCH containing:
deletion
non_fast_forward
pull_request:
required_approving_review_count: 1
allowed_merge_methods: ["squash", "rebase"], matching the repo settings
Leave dismiss_stale_revi
8216
ews_on_push unchanged here. Changing it is tracked in its own sub-issue, "Clear approvals on fresh commits".
required_status_checks: build-and-test, unchanged
This change doesn't make the policy stricter, apart from removing the merge method that the repo settings already disable. Stricter rules (stale-approval dismissal, merge queue, more required checks) come in later sub-issues of this epic.
Rollout
Create protect-main in evaluate mode, next to the two existing rulesets.
Check the rule insights to confirm it evaluates the same way as the existing rulesets.
Switch protect-main to active, then delete main and main: require PR review and CI.
If #547 (Manage repository rulesets as code) lands first, this should land as .github/rulesets/protect-main.json and be applied with the script.
Acceptance criteria
Exactly one active branch ruleset (protect-main) targets main
protect-main contains deletion, non-fast-forward, pull request (1 approval, squash or rebase) and the build-and-test required check
The old main and main: require PR review and CI rulesets are deleted
Activity