Skip to content

fix(ci): merge Dependabot PRs as a user so CI and releases trigger - #99

Merged
dantech2000 merged 1 commit into
mainfrom
auto-merge-trigger-ci
Jul 29, 2026
Merged

fix(ci): merge Dependabot PRs as a user so CI and releases trigger#99
dantech2000 merged 1 commit into
mainfrom
auto-merge-trigger-ci

Conversation

@dantech2000

Copy link
Copy Markdown
Owner

Auto-merge was fixed in #73 and genuinely works — fetch-metadata now returns update-type correctly. But it merges with secrets.GITHUB_TOKEN, and GitHub does not trigger workflows from pushes made with GITHUB_TOKEN (its recursion guard).

Impact — two silent failures

$ gh pr view 81 --json mergedBy       -> app/github-actions
$ gh run list --commit fb059dc        -> (empty)
$ gh run list --commit 698e701        -> (empty)
$ gh run list --commit b368ce3        -> (empty)
  1. main goes untested after every dep bump. fix(deps): bump github.com/urfave/cli/v3 from 3.9.1 to 3.10.1 #80, fix(deps): bump github.com/mattn/go-isatty from 0.0.22 to 0.0.24 #81, fix(deps): bump github.com/mattn/go-colorable from 0.1.14 to 0.1.15 #86, fix(deps): bump golang.org/x/sys from 0.46.0 to 0.47.0 #88, fix(deps): bump github.com/aws/aws-sdk-go-v2/service/servicequotas from 1.35.7 to 1.37.1 #90, fix(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudwatch from 1.59.0 to 1.66.0 #95 all merged with zero Test/Lint/govulncheck runs against the resulting commits. A bad bump would land silently.
  2. fix(deps) commits never cut a release. This defeats ci: make Go module bumps cut a patch release #75/fix(ci): repair invalid dependabot.yml allow block #77 entirely — the prefix is correct, but Release Please is never invoked to act on it. The gap that left the x/text and crypto/tls CVEs unreleased is still open.

Fix

Switch only the merge step to GH_PAT, so the merge is attributed to a real user and downstream workflows fire. release-please.yml:23 already uses GH_PAT for precisely this reason.

The other four steps stay on the scoped, auto-rotating GITHUB_TOKEN — they only read Dependabot metadata and check results, so there's no reason to widen their credentials. This keeps the long-lived PAT's blast radius to a single step.

Trade-off

A PAT is long-lived and broadly scoped versus GITHUB_TOKEN's auto-rotation. The alternative is dropping auto-merge and reviewing dep PRs by hand. Given auto-merge is already gated on Test and Lint passing, and restricted to patch/minor via fetch-metadata, the PAT is scoped to the narrowest possible step here.

Verification

Since CI never ran on those merged bumps, I validated current main locally:

task dev:full     ✅ passed (fmt + vet + lint + test + build)
govulncheck ./... No vulnerabilities found.

main is healthy — the missing runs hadn't masked a real break.

The real proof is the next Dependabot auto-merge: Test, Lint, and Release Please should all run on the resulting main commit, and a 0.9.2 release PR should appear on its own.

Auto-merge worked, but merged with secrets.GITHUB_TOKEN. GitHub deliberately
does not trigger workflows from pushes made with GITHUB_TOKEN -- it is the
built-in recursion guard -- so every auto-merged dependency bump landed on main
with no Test run, no Lint run, and no Release Please run.

Two consequences, both silent. main went untested after each bump: #80, #81,
#86, #88, #90 and #95 all merged with zero workflow runs against the resulting
commits. And `fix(deps)` commits never cut a release, which defeats the whole
point of 59d889c -- the prefix was right, but the workflow that acts on it was
never invoked.

Confirmed via `gh pr view 81 --json mergedBy` -> app/github-actions, and
`gh run list --commit <sha>` returning empty for every auto-merged commit.

Switch only the merge step to GH_PAT so the merge is attributed to a real user
and downstream workflows fire. release-please.yml already uses GH_PAT for this
exact reason. The other four steps stay on the scoped, auto-rotating
GITHUB_TOKEN: they only read Dependabot metadata and check results, so there is
no reason to widen their credentials.

Verified current main locally in the meantime, since CI never did:
task dev:full passes and govulncheck reports no vulnerabilities.
@dantech2000
dantech2000 merged commit ab21bd1 into main Jul 29, 2026
5 checks passed
@dantech2000
dantech2000 deleted the auto-merge-trigger-ci branch July 29, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant