Skip to content

feat(pull-requests): pull request panel understands a merge queue - #233

Merged
badcuban merged 2 commits into
mainfrom
threadlines/merge-queue-ui
Sep 5, 2026
Merged

feat(pull-requests): pull request panel understands a merge queue#233
badcuban merged 2 commits into
mainfrom
threadlines/merge-queue-ui

Conversation

@badcuban

@badcuban badcuban commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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 mergeQueue on 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.

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.
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Sep 5, 2026 9:21am UTC

Request Review

@badcuban
badcuban enabled auto-merge September 5, 2026 09:21
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Sep 5, 2026
@badcuban
badcuban added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit adc9609 Sep 5, 2026
16 checks passed
@badcuban
badcuban deleted the threadlines/merge-queue-ui branch September 5, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant