Commit b1670c3
committed
ci: merge after approval, not auto-merge on green
main is governed by a ruleset, not classic branch protection — which is why my
earlier check of branches/main/protection returned 404 and I wrongly concluded the
branch was unprotected. The ruleset has required_approving_review_count: 1,
require_code_owner_review: true and zero bypass actors, and .github/CODEOWNERS
assigns `*` to @aws/aws-lambda-tooling. Every Dependabot pull request is therefore
BLOCKED with reviewDecision=REVIEW_REQUIRED:
#842 BLOCKED REVIEW_REQUIRED MERGEABLE
#841 BLOCKED REVIEW_REQUIRED MERGEABLE
#839 BLOCKED REVIEW_REQUIRED MERGEABLE
So the workflow could never have merged anything, and worse, it hid that: BLOCKED
was lumped in with conflicts and reported as "most likely a sibling update landed
first", so the hourly sweep would have skipped every pull request forever with a
diagnosis that was simply wrong.
Three changes, no governance change. No bypass actor is added and no approval is
forged: a bot approval cannot satisfy a code-owner requirement anyway, and whether
CI should be allowed to merge without review is the code owners' call, not this
branch's.
* reviewDecision is now a gate, checked last so that reaching it means the pull
request is example-only, verified at its current head, and green. A pull request
waiting on review is reported as exactly that, which turns the sweep's job
summary into a worklist of "verified, waiting only on you".
* BLOCKED is classified separately from DIRTY/BEHIND/DRAFT/UNKNOWN and names the
ruleset as the cause.
* The workflow is renamed Dependabot Merge and its header, the script's header and
the pull request description say merge-after-approval rather than auto-merge.
The script's own rollup exclusion is updated to match the new name.
Twelve paths exercised: the four reviewDecision states, the three post-merge failure
classifications under an approval, and the five earlier gates still firing ahead of
the review check.1 parent 8a35cb2 commit b1670c3
2 files changed
Lines changed: 49 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
57 | 63 | | |
58 | 64 | | |
59 | 65 | | |
| |||
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | | - | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
158 | 164 | | |
159 | 165 | | |
160 | 166 | | |
161 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
162 | 189 | | |
163 | 190 | | |
164 | 191 | | |
| |||
190 | 217 | | |
191 | 218 | | |
192 | 219 | | |
193 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
194 | 227 | | |
195 | 228 | | |
196 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
| |||
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | | - | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
0 commit comments