Skip to content

fix(merge): let merge queue choose the merge method - #68

Merged
kitlangton merged 1 commit into
mainfrom
fix/merge-queue-method-flag
Oct 25, 2026
Merged

kitlangton merged 1 commit into
mainfrom
fix/merge-queue-method-flag

Conversation

@kitlangton

Copy link
Copy Markdown
Owner

When the base branch uses a merge queue, the queue owns the merge strategy. ghui still passed the selected method flag to gh pr merge, and gh printed ! The merge strategy for main is set by the merge queue. That line was the first line of stderr, so it showed up as the merge error no matter which method was picked.

Changes

  • mergeActionCliArgs: for queue targets, now runs gh pr merge <n> and auto runs gh pr merge <n> --auto, with no --squash/--merge/--rebase. For queue targets gh already turns both into a queue request (payload.auto = true) and skips the method prompt.
  • admin still passes the selected method, because --admin bypasses the queue and does a direct merge. It still leaves out --delete-branch.
  • Tests: new unit cases in test/mergeActions.test.ts. The GitHubService matrix in test/githubMergeQueue.test.ts now expects no method flag for queued now/auto. The fixture in test/fixtures/mergeQueue.ts now rejects a method flag on non-admin queue merges, so this can't regress quietly.
  • Changeset: patch.

Fixes #62

Queue requests (now and auto) no longer pass --squash, --merge, or --rebase to gh pr merge, since the merge queue owns the strategy. Admin bypass keeps the selected method.
@kitlangton
kitlangton merged commit e0b4ab1 into main Oct 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle when merge strategy is already set by the merge queue

1 participant