Commit b1a9268
fix: guard source-side tag pushes, the one hole no branch protection covers
`git push origin refs/tags/v1.2.3` published a release tag unattended. The
guard was spelled `*:refs/tags/*`, which only ever saw the destination-side
form — the same colon-shaped blind spot that let `refs/heads/main` through, one
line up in the same list. Both are now spelled without the colon
(`*refs/tags/*`, `*refs/heads/main*`), each subsuming its destination-side form
rather than sitting beside it.
The maintainer found this one by hand and named it on the PR; it was left open
by the previous commit, which read the reviews and not the thread. That reading
gap is fixed separately in `fix/resume-reads-comments`.
This entry is deliberately settled ahead of the open question about the
protected-BRANCH patterns, because it does not depend on it: a tag is not a
branch, so no `enforce_admins` setting covers publishing one, and the guard is
required whichever way that argument goes. `git push origin v9.9.0` — a tag
without the `refs/` prefix — is caught by `* v*`, which stays.
Verified both new pins are holes against the pre-fix settings and guarded
after, that the destination-side spelling `HEAD:refs/tags/v1.2.3` still matches
(so dropping the colon regressed nothing), and that `git push origin
my-feature` and `git push -u origin fix/issue-620` stay unattended. Gate now
checks 105 shapes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012LExo6fcbup75vtc9NfoAR1 parent e9943be commit b1a9268
3 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
335 | 342 | | |
336 | 343 | | |
337 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
| |||
0 commit comments