Skip to content

fix(ci): dependabot auto-merge never actually merged anything#168

Merged
pbertsch merged 1 commit into
mainfrom
fix/dependabot-automerge
Jul 5, 2026
Merged

fix(ci): dependabot auto-merge never actually merged anything#168
pbertsch merged 1 commit into
mainfrom
fix/dependabot-automerge

Conversation

@pbertsch

@pbertsch pbertsch commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

The daily Dependabot auto-merge workflow's skip condition treated mergeStateStatus == "UNKNOWN" as "already in the merge queue" -- but UNKNOWN just means GitHub hasn't finished computing mergeability yet (the common case on a fresh poll), not "already queued." Every eligible PR was silently skipped every single day since at least mid-May, despite the workflow itself reporting "success" (no crash, just an empty no-op every run).

Separately, even a PR that had passed that flawed check would have hit a second, compounding bug: the merge command itself (gh pr merge --squash, no --auto) doesn't work for a merge-queue-gated branch -- it just prints a warning and does nothing, the same issue found and fixed earlier in this release for this repo's own e2e.yml CI workflow.

Fixed both:

  1. Only skip on DIRTY/BLOCKED (states that definitively block a merge) -- let a merge attempt happen and fail on its own terms otherwise, rather than pre-filtering on a stale/transient field.
  2. Added --auto to the merge command.

Test plan

  • YAML syntax validated
  • Verified by manually invoking the corrected logic against the real backlog -- 9 previously stuck PRs (some open since May 14) are now genuinely in the merge queue, confirmed via the GraphQL mergeQueue field (the REST/gh CLI autoMergeRequest field doesn't reflect merge-queue membership, only the separate "auto-merge" feature -- a red herring while debugging this). PR chore(deps): bump devalue from 5.6.4 to 5.8.1 in /website #115 already merged from the queue during this verification.
  • Will confirm the daily scheduled run picks up newly-eligible PRs going forward.

Its skip condition treated mergeStateStatus == "UNKNOWN" as "already
in the merge queue" - but UNKNOWN just means GitHub hasn't finished
computing mergeability yet (the common case on a fresh poll), not
"already queued." Every eligible PR was silently skipped every single
day since at least mid-May, despite the workflow itself reporting
"success."

Separately, even a PR that had passed that check would have hit a
second, compounding bug: the merge command itself (gh pr merge
--squash, no --auto) doesn't work for a merge-queue-gated branch - it
just prints a warning and does nothing, the same issue found and
fixed earlier for this repo's own CI (see the e2e.yml fix in this
same release).

Fixed both: only skip on DIRTY/BLOCKED (states that definitively block
a merge), and let a merge attempt happen and fail on its own terms
otherwise; added --auto to the merge command.

Verified by manually invoking the corrected logic against the real
backlog - 9 previously stuck PRs (some open since May) are now
genuinely in the merge queue, confirmed via the GraphQL mergeQueue
field (the REST/gh CLI autoMergeRequest field doesn't reflect
merge-queue membership, only the separate "auto-merge" feature).
@pbertsch pbertsch requested a review from a team as a code owner July 5, 2026 22:18
@pbertsch pbertsch enabled auto-merge July 5, 2026 22:18
@pbertsch pbertsch added this pull request to the merge queue Jul 5, 2026
Merged via the queue into main with commit ef8fd5e Jul 5, 2026
15 checks passed
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