feat(pull-requests): pull request panel understands a merge queue - #233
Merged
Conversation
The pull request panel assumed the old auto-merge model. Where the base branch runs a GitHub merge queue that was wrong three ways: it made "Update branch" the primary action and turned the merge off with "Update the branch first", even though the queue builds its own merge on the latest base; it offered a direct Squash/Merge/Rebase with a method picker, which GitHub refuses into a queue-protected branch and whose method the queue decides anyway; and a pull request already sitting in the queue looked no different from one merely armed. Arming was also refused outright whenever the pull request was green, which under a queue is exactly when the user wants it: gh adds it to the queue. The detail read now asks for the base's queue in the same GraphQL request that already counted how far the branch is behind, so it costs no extra round trip, and carries it through as an optional `mergeQueue` on the detail. Where it is present, the header offers one "Merge when ready" button (no method picker, no confirmation), moves "Update branch" into the overflow menu, drops the direct merge, and shows "Queued" or "Queued, 2nd" with a way to leave the queue. The arming refusal now reads the queue alongside the merge state and only refuses where the base has no queue. Repositories without a queue, and the other hosts, behave exactly as before.
gh's disarm command returns without touching a pull request the host has already taken into its merge queue, so the panel's "Leave the merge queue" item did nothing. Disarming now reads whether the pull request is queued first and, where it is, takes it out with GitHub's dequeue mutation by node id; otherwise it disarms through gh as before.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
badcuban
enabled auto-merge
September 5, 2026 09:21
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.
When the base branch runs a GitHub merge queue, the pull request panel was wrong three ways: it led with Update branch and turned the merge off with "Update the branch first" even though the queue builds its own merge on the latest base; it offered a direct Squash/Merge/Rebase with a method picker, which GitHub refuses into a queue-protected branch; and a pull request already in the queue looked no different from one merely armed. Arming a green pull request was also refused outright, which under a queue is exactly when the user wants it.
The detail read now asks for the base's queue in the GraphQL request it already makes, and carries it as an optional
mergeQueueon the detail. Where present, the header offers one "Merge when ready" button (no method picker, no confirmation), moves Update branch into the overflow menu, drops the direct merge, and shows "Queued" or "Queued, 2nd" with a way to leave the queue. Leaving actually leaves: gh's disarm returns without touching a queued pull request, so that case uses GitHub's dequeue mutation by node id. Repositories without a queue, and the other hosts, behave exactly as before.