Repository navigation
Commit 077b362
ci(vale): pin the publish job to main in code, not only in settings
Review finding on #136: with the required reviewer gone, the environment's
deployment branch policy is the ONLY thing keeping an off-`main`
`workflow_dispatch` from publishing. Under `npm-production` there were two
independent obstacles; this PR removed one of them, so the remaining one
should not also be the only one.
The guard duplicates the branch policy on purpose. One copy lives in a
settings page that can be edited without review and whose relaxation is an
absence — nothing turns red when it happens. The other lives here, next to
the reasoning, and cannot change without a diff.
`github.ref == 'refs/heads/main'` covers both paths into this job. The
`push` path is already filtered to `main`, so the guard is a no-op there;
the `workflow_dispatch` path is the real case, since a dispatch runs from
whatever ref it was launched on.
Only `publish` is guarded. `gate` and `prepare` hold no environment, no
id-token, and only `contents: read`, so off-`main` they are a harmless dry
run of the digest verification and the pack. Guarding them instead would
protect `publish` by inference through `needs:` — one control with a spare,
which is the shape being corrected.
The spec requirement gains the same constraint, so deleting either copy is
a spec violation rather than a tidy-up.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jwc9FFroR3mTZ4hLiSkkX31 parent db977b7 commit 077b362
2 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
293 | 318 | | |
294 | 319 | | |
295 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| |||
0 commit comments