Commit d692ec9
fix(branch-protection): stop reverting security remediation + clobbering repo checks
build_payload() previously did a wholesale full-body PUT that, on every run:
1. re-added a code_scanning (CodeQL) merge-protection rule — GitHub's
code-scanning gate is flaky (perpetually 'expects results'), deadlocking
PRs into admin-only merges;
2. re-added admin bypass_mode='always' + three Integration bypass actors
(29110/1143301/1236702), REVERTING the 2026-06-29 bypass-actor security
remediation;
3. wrote an empty required_status_checks, WIPING each repo's own gates
(e.g. a Rust repo's 'analyze (rust, none)' + 'llvm-cov line coverage').
Now:
- no code_scanning rule (CodeQL enforced via a required_status_check instead);
- bypass_actors = admin (RepositoryRole 5) at 'pull_request' only;
- apply_one() reads the repo's existing required_status_checks and passes them
to build_payload, so standardising is ADDITIVE (repairs the invariant
baseline) and never clobbers per-repo gates.
Verified: payload is valid JSON, carries no code_scanning, single admin
pull_request bypass, and preserves supplied per-repo checks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5747de8 commit d692ec9
1 file changed
Lines changed: 24 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 106 | + | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
| |||
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
149 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
150 | 162 | | |
151 | 163 | | |
152 | 164 | | |
| |||
0 commit comments