bors-ng
bors-ng copied to clipboard
Using delete_merged_branches shouldn't delete if there are dependent branches
I think there may be two issues here, but one is more important than the other:
-
Some engineers on the teams have dependent PRs out: master, feat-a, and feat-b, where feat-a is off of master and feat-b is off of feat-a. If feat-a is merged, delete_merged_branches=true causes bors to delete feat-a, which then causes an issue for feat-b. (GitHub closes the feat-b PR.)
-
Separately, we haven't actually started using bors to merge, and I think bors is deleting a PR branch even if bors isn't the one merging. In other words, we have the bors bot turned on and an engineer could say
bors r+to merge it, but the engineer is instead using the UI merge button. In this scenario, bors is still deleting the branch after merging and thus breaking the dependent PR.
Fixing 1 would probably be sufficient - could bors leave a branch alone if there are PRs dependent on it?
Fixing 2 might be easier though - bors shouldn't delete branches that it hasn't merged itself.
This is even more painful than it otherwise would be because it leaves the dependent PR (feat-b in the original example) in an unrecoverable state. The PR can't be opened because the base branch has been deleted, and the base branch can't be changed because the PR is closed.
Looks like this is solved by #1023 !