gh pr merge --delete-branch does not delete the remote branch when PR is merged via a merge queue - #10072
Closed
BagToad wants to merge 1 commit into
Closed
gh pr merge --delete-branch does not delete the remote branch when PR is merged via a merge queue#10072BagToad wants to merge 1 commit into
gh pr merge --delete-branch does not delete the remote branch when PR is merged via a merge queue#10072BagToad wants to merge 1 commit into
Conversation
When running `gh pr merge --delete-branch`, no longer delete the remote branch if the PR is merged via a merge queue. Attempting to delete the remote branch with a PR that will be merged with a merge queue can cause the PR to be unexpectedly closed and the remote branch deleted before a successful merge.
BagToad
marked this pull request as ready for review
December 12, 2024 18:01
Member
Author
|
Closing in favor of #10074 |
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.
Description
When running
gh pr merge --delete-branch, no longer delete the remote branch if the PR is merged via a merge queue.Attempting to delete the remote branch with a PR that will be merged with a merge queue can cause the PR to be unexpectedly closed and the remote branch deleted before a successful merge.
Resolves #7011
Demo
Current Behavior...
Proposed
Notes
To reproduce this, you have to configure a repository with a ruleset that requires a merge queue. The merge queue must be configured in some way that allows a PR to wait in the merge queue for some amount of time.
The following settings will work to accomplish that when one PR is in the merge queue:
merge queue settings image