Detect merge queue status via the GitHub GraphQL API's mergeQueueEntry
field and temporarily skip queued branches in push, sync, and submit
commands. Unlike merged state (which is persisted permanently), queued
state is transient — held in-memory only via a json:"-" tagged field
on BranchRef. Each command run re-checks queue status from the API, so
if a PR is ejected from the queue it becomes active again on next run.
Changes:
- Add MergeQueueEntry to PullRequest GraphQL struct and PRDetails
- Add IsQueued()/IsSkipped()/QueuedBranches() to stack model
- Update ActiveBranches() family to exclude queued branches
- Skip queued branches in push, sync (rebase + push), and submit
- Add queued icon, style, and QUEUED state label in TUI view
- Add comprehensive tests for queued state handling
Closesgithub/pull-requests#24019
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When a rebase conflict was detected during 'gh stack sync', the function
continued to push branches and reported 'Stack synced' with exit code 0.
Now it persists PR state and returns ErrConflict immediately, preventing
the confusing post-conflict push and success message.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When Ctrl+C is pressed during a prompter interaction, the CLI now prints
a friendly 'Received interrupt, aborting operation' message instead of
ugly wrapped errors like 'failed to read prefix: could not prompt:
interrupt'.
Changes:
- Add isInterruptError(), printInterrupt(), and errInterrupt sentinel
to cmd/utils.go for centralized interrupt detection
- Update all 8 prompt sites (init, push, checkout, utils) to detect
survey's terminal.InterruptErr and exit cleanly
- Update callers of resolveStack, pickRemote, and ensureRerere to
propagate interrupt without double-printing errors
- Change ensureRerere signature to return error so callers can abort
on interrupt
- Add tests for interrupt detection helpers
Closes td-746bdc
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>