-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
blockedbugSomething isn't workingSomething isn't workinggh-prrelating to the gh pr commandrelating to the gh pr commandp3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmeticplatformProblems with the GitHub platform rather than the CLI clientProblems with the GitHub platform rather than the CLI client
Description
Describe the bug
On repos with merge queues enabled, using gh pr merge with --delete-branch forces the PR to be closed before merging it.
A clear and concise description of what the bug is.
gh --version: 2.23.0
Steps to reproduce the behavior
- Create a repo in a team / enterprise org.
- Enable merge queues.
- Create a PR.
- On the branch for the PR, using
gh, run:gh pr merge --squash --delete-branch - Output in terminal:
! The merge strategy for main is set by the merge queue
✓ Pull request #1 will be added to the merge queue for main when ready
From https://github.com/org/repo
* branch main -> FETCH_HEAD
Already up to date.
✓ Deleted branch fix/merge-queue-issue and switched to branch main
- On the repo, PR gets added to the merge queue.
- But, the remote branch is deleted immediately after (before merge), which closes the PR and removes it from the merge queue.
Expected vs actual behavior
After 5:
6. On the repo, PR gets added to the merge queue.
7. Remote branch is persisted until merge.
8. Merge queue is executed nominally.
9. If merge is successful, delete remote branch, mark PR as merged. If merge fails, keep remote branch and keep PR open.
jackmpcollinswill-rippling
Metadata
Metadata
Assignees
Labels
blockedbugSomething isn't workingSomething isn't workinggh-prrelating to the gh pr commandrelating to the gh pr commandp3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmeticplatformProblems with the GitHub platform rather than the CLI clientProblems with the GitHub platform rather than the CLI client