Skip to content

ci(auto-merge): arm auto-merge unattended when ci goes green - #642

Merged
plind-junior merged 1 commit into
testfrom
ci/auto-merge-on-green
Jul 30, 2026
Merged

ci(auto-merge): arm auto-merge unattended when ci goes green#642
plind-junior merged 1 commit into
testfrom
ci/auto-merge-on-green

Conversation

@plind-junior

Copy link
Copy Markdown
Member

Summary

  • green ci armed nothing: the only two arming surfaces were the auto-merge label and the /auto-merge comment, both owner-driven. combined with deauthorize-on-push, a contributor force-push silently disarmed a PR and nobody re-armed it (fix(digest): drop archived pages from followups-due #626 was armed and disarmed twice).
  • add ci-auto-merge.yml: on ci completing green for a PR, wait for every other check run on that head sha and arm native auto-merge if none failed.
  • bars are unchanged — arming still routes through arm-auto-merge.yml, so 100% diff coverage of changed python under src/vouch/ and a closing reference to an issue plind-junior opened are both still required.

Notes

  • ci is one of several workflows on a PR and test has no branch protection, so the job waits out all check runs itself rather than trusting required-checks.
  • the owner-issue link is read once up front and failure is silent there; arm-auto-merge comments on that bar, which is right for a human arming and would be per-push noise unattended.
  • no checkout, no PR code executed — metadata only, since the arming job holds a write token.
  • workflow_run resolves the workflow file from the default branch, so this takes effect once it reaches main.

Test plan

  • zizmor --persona regular .github/workflows/ clean
  • every run: block parses under bash -n
  • ci green on test

auto-merge had two arming surfaces, both requiring the owner to act: the
auto-merge label and the /auto-merge comment. green ci triggered nothing, and
deauthorize-on-push voids arming on every contributor push — so a PR like #626
was armed twice and disarmed twice by force-pushes, then sat clean and green
with no one left to re-arm it.

add a third arming path with no human in it. on `ci` completing green for a
pull request, resolve the PR from the head sha, confirm it still sits on that
sha and is open and undrafted, wait for every other check run on the sha to
finish, and refuse if any of them failed — `ci` is only one of the workflows a
PR runs, and `test` has no branch protection to wait on the rest.

the bars are unchanged. arming still goes through arm-auto-merge.yml, so full
diff coverage of changed python under src/vouch/ and a closing reference to an
issue plind-junior opened are both still required. the owner-issue link is
read once up front here too, silently: arm-auto-merge comments when a PR misses
that bar, which is right for a human who just asked to arm and would be
per-push noise unattended.

no checkout, no PR code — only metadata, since the arming job holds a write
token. workflow_run resolves this file from the default branch, so it takes
effect once it reaches main, not on merge to test.
@github-actions github-actions Bot added ci github actions and automation size: S 50-199 changed non-doc lines labels Jul 30, 2026
@plind-junior
plind-junior merged commit f24243d into test Jul 30, 2026
14 checks passed
@github-actions github-actions Bot added the ci: passing ci is green label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: passing ci is green ci github actions and automation size: S 50-199 changed non-doc lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant