Repository navigation
Description
Problem
A commit that Dependabot auto-merges onto main gets no CI run on main: no ci.yml and no Security Scan.
dependabot-automerge.yml runs gh pr merge --auto --squash with GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}. When auto-merge fires, GitHub records the push as made by that token, and GitHub does not create workflow runs for events triggered by GITHUB_TOKEN. This is a deliberate guard against recursive runs. The push to main happens, and nothing runs on it.
Evidence
Every recent merge to main, with whether it got a push run:
| Merge commit | PR | Merged by | ci.yml run on main |
|---|---|---|---|
3f9ceb54 |
#560 | scttfrdmn | ✅ success |
88399484 |
#553 | scttfrdmn | ✅ success |
| — | #555 | app/github-actions | ❌ none |
| — | #564 | app/github-actions | ❌ none |
37d40879 |
#583 | scttfrdmn | ✅ success |
14216b71 |
#577 | app/github-actions | ❌ none |
670b5f75 |
#582 | app/github-actions | ❌ none |
Checked with gh run list --workflow=ci.yml --commit=<full sha>, which returns an empty list for every app/github-actions merge.
What it costs, stated honestly
Less than it sounds like, but not nothing.
- The merged code was tested. Strict branch protection requires a PR to be up to date before it can merge. So the squash commit has the same tree the PR's last green run tested, and the code on
mainis the code CI checked. - No job runs only on
main. Nothing in.github/workflows/gates onevent_name == 'push'orrefs/heads/main, so nomain-only job is being skipped. - What is lost is confirmation of
mainitself. The workflows' status onmainshows only the last human merge, so a Dependabot run of merges reads as green without anything having run onmain.Security Scan's push run onmainis skipped too. - The gap grows as auto-merge does its job. Four of the last seven merges were made by the app. Auto-merge was only recently made to work at all (the five causes in the workflow's header), so this is new rather than long-standing.
This milestone's theme is suites that never run. This is a suite that never runs on one class of commit, and it reads as green.
Fix
Have the merge use a token whose pushes trigger workflows:
- A GitHub App installation token (recommended).
actions/create-github-app-tokenmints one per run, it is scoped to this repository, it expires within an hour, and it needs no human account. Pushes made with it triggerpushworkflows normally. - A fine-grained PAT with
contents: writeandpull-requests: writeon this repo only. Simpler, but tied to a person and needs rotating.
Either one needs a new repository secret, which is a settings change for the maintainer. That is why this is an issue and not a PR.
Not a fix: making a workflow re-trigger CI on workflow_run after Dependabot merges. Its checks report against the triggering workflow's context, and it adds a second path to keep in sync with push.
Acceptance
- The next Dependabot auto-merge produces a
ci.ymlpush run and aSecurity Scanrun on its merge commit. Verify withgh run list --workflow=ci.yml --commit=<sha>returning a run. A green status onmainalone does not count, because that is what is green today. - A comment in
dependabot-automerge.ymlrecords why the token is notGITHUB_TOKEN, so nobody "simplifies" it back. This would be cause 6 in its header list. - Optionally, a test in
internal/configthat fails if the merge step's token issecrets.GITHUB_TOKEN. This is the same shape as the other workflow-invariant tests there.
Activity
fix(ci): Dependabot auto-merge arms with a token whose merges run CI …
scttfrdmn commentedon Oct 6, 2026
Reopening: #585's "Fixes #584" closed this on merge, but the acceptance criterion hasn't been met yet. No Dependabot PR has auto-merged since #585 (
8fd6cb90), so nothing has shown that a merge made withAUTOMERGE_TOKENgets aci.ymlpush run. Close this whengh run list --workflow=ci.yml --commit=<sha>returns a push run for the first such merge commit.scttfrdmn commentedon Oct 7, 2026
Verified on a real Dependabot auto-merge. Closing.
#592 (
source-map-js1.2.1 → 1.2.2, the security update for alert #20) is the first Dependabot merge since #585 switched the merge step toAUTOMERGE_TOKEN:Enable auto-merge for minor and patch updatessteps ran (not skipped) and succeeded, so the secret reached the workflow and was accepted.scttfrdmnbecause the token belongs to that account, but the merge landed at 17:34:33Z, 30 s after the last of the PR's 60 checks completed (17:34:03Z).76323d18has push runs:CI(37660136450) andSecurity(37660136402), both green. Before fix(ci): Dependabot auto-merge arms with a token whose merges run CI on main #585, the four auto-merges deps(deps): bump propcache from 0.5.3 to 0.5.4 in /sdks/python #555, deps(deps): bump multidict from 6.8.0 to 6.9.1 in /sdks/python #564, deps(deps): bump the production-dependencies group across 1 directory with 6 updates #577 and deps(deps): bump charset-normalizer from 3.5.1 to 3.5.2 in /sdks/python #582 had none.The acceptance criterion was
gh run list --workflow=ci.yml --commit=<sha>returning a push run for an auto-merged commit. It does.