Commit bb4e344
committed
ci: grant checks/statuses, fail closed on an absent rollup, widen push paths
Four fixes from the ninth review on #844. The first is a fail-open hole.
Grant checks: read and statuses: read. statusCheckRollup is the gate both the
workflow and the merge script depend on, and it is built from Checks resources and
commit statuses — neither of which a permissions block naming only contents,
pull-requests and actions grants. Either GraphQL errors, making the workflow a
permanent no-op that looks healthy, or it returns the field empty, which `[]?` would
have swallowed as "all checks green" and merged past a red Commit Lint. That is the
exact check #799 shows going red on a Dependabot pull request.
Belt and braces on the same hole: the script now refuses outright when
statusCheckRollup is not an array, so neither an absent permission nor a head with
no checks yet can read as success. It used to merge in that case; it now skips and
lets the sweep look again.
The drift guard read only the plural `directories`. The singular `directory` is
equally valid and is the canonical form for one directory, so an entry using it
contributed nothing and its manifest was reported as unclaimed — validate failing on
correct config, with a message telling the author to add an entry already in the
file. Both spellings are read now.
The drift guard also asserts the two keys the grouping actually rests on.
`applies-to: security-updates` is load-bearing because plain groups batch version
updates only, and those are off via the limit; a 48th entry copy-pasted without it
would pass every check here while its advisories reverted to one pull request each.
A missing or non-zero open-pull-requests-limit is the mirror image. With 47
near-identical entries these are exactly the copy-paste omissions worth machine
checking.
Widen the push trigger to every input the selector calls shared. It listed only
src/**, so layer/**, Cargo.toml and Cargo.lock were verified against the examples on
no event at all — and layer/bootstrap is the code path all eight zip examples boot,
since build-layer copies it into the artifact each of them injects. The comment
claiming those changes are covered on push to main is now true. Pull request triggers
are unchanged, so source pull requests still do not fan out to eighteen jobs.
Twenty merge-script paths re-run with expected exit codes, zero mismatches, plus the
drift guard against a singular-directory entry, a missing applies-to, a non-zero
limit, and the clean tree.1 parent b21954d commit bb4e344
4 files changed
Lines changed: 55 additions & 9 deletions
File tree
- .github
- scripts
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
88 | 114 | | |
89 | 115 | | |
90 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
0 commit comments