fix(ci): arm dependabot auto-merge with an app token so the merge queue actually enrolls - #42
Merged
Merged
Conversation
…ue actually enrolls Auto-merge armed via the default GITHUB_TOKEN records an AutoMergeEnabledEvent but never enrolls in the merge queue (GitHub anti-loop design; same limitation release-plz.yml documents for tag pushes). Observed on #40/#41: both CLEAN with auto-merge enabled for 7+ hours, queue empty. Mint an installation token via actions/create-github-app-token when the APP_ID/APP_PRIVATE_KEY credentials exist (Dependabot secrets store - this runs on Dependabot-actor pull_request events) and arm auto-merge with that; fall back to GITHUB_TOKEN (pre-fix behavior, manual enqueue nudge) when absent, so fresh template clones are not broken. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dependabot PRs #40/#41 sat
CLEANwith auto-merge enabled for 7+ hours and never merged. The timeline shows anAutoMergeEnabledEventbut noAddedToMergeQueueEvent— auto-merge armed via the defaultGITHUB_TOKENnever enrolls in the merge queue, per GitHub's anti-loop design (the same limitationrelease-plz.ymlalready documents for tag pushes). They needed a manualenqueuePullRequestnudge.Fix
actions/create-github-app-token(SHA-pinned, v3.2.0) whenAPP_ID/APP_PRIVATE_KEYare configured, and armgh pr merge --autowith it. Reuses the repo-wide app-credential namesrelease-plz.ymldesignates as the canonical pattern.GITHUB_TOKENwhen the secrets are absent (fresh template clone) — identical to pre-fix behavior, zero regression.gh secret set APP_ID --app dependabot), not the Actions one.Verification
actionlintclean (it caught thatsecretsisn't legal in step-levelif:; hoisted to job-levelenv).