Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionally suppress branch cleanup #4174

Open
nipunn1313 opened this issue Feb 24, 2022 · 1 comment
Open

Conditionally suppress branch cleanup #4174

nipunn1313 opened this issue Feb 24, 2022 · 1 comment

Comments

@nipunn1313
Copy link

I have a use case where I have two stacked PRs

PR1: Merge branch a into main
PR2: Merge branch b into a

I am using the queue action of mergify to merge PR1. As soon as mergify completes the merge of PR1, it deletes the branch a. Github then automatically updates PR2's base branch to main

eg screenshot:
image

This is not the behavior I'd like. Folks reviewing PR2 now end up unexpectedly seeing a new view (both PR1+PR2 squashed instead of just PR2) until I take some action on PR2 (to rebase on main or merge main).

For my workflow, I'd like branch a to hang around until it's safe to eliminate. I imagine an option to do this could go here https://docs.mergify.com/actions/queue/#id2.

Best would be to auto-cleanup a ONLY IF there don't exist any other PRs whose base is a. Thus when PR1 closes, no branches would be cleaned up. When PR2's base branch is changed to main, then and only then would mergify clean up a.

@sileht
Copy link
Member

sileht commented Feb 25, 2022

Mergify does not delete branches when it merges pull request.

Did you use the Mergify "delete head branch" action or the GitHub delete head branch setting ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants