fix(ci): dependabot auto-merge never actually merged anything#168
Merged
Conversation
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).
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.
Summary
The daily Dependabot auto-merge workflow's skip condition treated
mergeStateStatus == "UNKNOWN"as "already in the merge queue" -- butUNKNOWNjust 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 owne2e.ymlCI workflow.Fixed both:
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.--autoto the merge command.Test plan
mergeQueuefield (the REST/ghCLIautoMergeRequestfield 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.