@@ -14,13 +14,12 @@ ignored and overwritten.
1414 The push uses ` --force-with-lease ` pinned to the remote sha the run observed.
15152 . The workflow opens (or updates) a pull request ` release ` -> ` main ` with the default
1616 ` GITHUB_TOKEN ` . This needs the repository setting * Actions -> General -> Allow GitHub
17- Actions to create and approve pull requests* . A PR opened with ` GITHUB_TOKEN `
18- triggers no workflows, so ` main-source-guard ` would never run on it; the workflow
19- therefore sets the ` only-release-into-main ` commit status on the release commit
20- itself, which satisfies the required check. No PAT is needed; an optional
17+ Actions to create and approve pull requests* . No PAT is needed; an optional
2118 ` RELEASE_PR_TOKEN ` secret is used for the PR step when present.
22- 3 . Merging that PR is the only way to change ` main ` . ` main-source-guard.yml ` fails
23- any PR into ` main ` whose head is not ` release ` .
19+ 3 . Merging that PR is the only way to change ` main ` . Branch protection (below) makes ` main `
20+ PR-only and lets only administrators merge; the maintainer merges the ` release ` PR and
21+ checks that its head is ` release ` (maintainer decision 2026-10-03: no source-branch
22+ workflow, settings only).
24234 . On push to ` main ` , ` pages.yml ` deploys ` docs/guide/ ` to GitHub Pages.
2524
2625## What is dropped on release
@@ -46,6 +45,5 @@ It refuses to run while `release` is checked out.
4645 tools/release/protect-main.sh # print what would be applied
4746 tools/release/protect-main.sh --apply # apply via gh api (needs admin)
4847
49- This requires a pull request, blocks force-push and deletion. Classic protection cannot
50- restrict a PR's source branch, so add the check ` only-release-into-main ` as required
51- (the script does; the workflow must have run once first).
48+ This requires a pull request (no approving review needed), blocks direct push, force-push and
49+ deletion, leaves the branch unlocked, and restricts merging to administrators.
0 commit comments