Show GitHub merge queue state in the PR popover and sidebar#352
Merged
Conversation
Add `mergeQueueEntry` (position, estimated time to merge, state) to the batch pull request GraphQL query and decode it onto `GithubPullRequest` via the new `GithubMergeQueueEntry`. `PullRequestMergeQueueStatus` summarizes queue membership for the UI: a PR counts as queued only when it is open, non-draft, and carries a live entry, so a stale entry on a merged or draft PR is ignored. When a server rejects the field (GitHub Enterprise Server before 3.8), the chunk fetch retries once without it so all PR state still loads, minus the merge-queue detail that server cannot provide. Position renders 1-based; the estimated time renders "<1 min left" below a minute, and an unmergeable entry reads "Cannot merge from queue".
The pull request popover gains a row showing "In merge queue" with the position and estimated time remaining. Queued open PRs get a dedicated brown git-merge-queue sidebar icon, and the toolbar status button and worktree accessory badge tint brown to match, so the queued state reads consistently everywhere a PR surfaces.
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.
Adds support for GitHub's merge queue across the pull request surfaces.
What
mergeQueueEntry(position, estimated time to merge, state) in the batch pull request GraphQL query and decodes it ontoGithubPullRequest.git-merge-queuesidebar icon, and the toolbar status button and worktree accessory badge tint brown to match, so the queued state reads consistently everywhere a PR surfaces.Details
The queue position appears only in the popover; the sidebar conveys the state through the icon alone, keeping the existing
#NNPR number unchanged.Close #296