Open ngscheurich opened 5 years ago
On merging a PR, Custodian deletes the branch. But deleting the branch causes GitHub to close any PRs that are based on that branch.
This feature was added only considering PRs based off master, so we just need to make Custodian check the branch refs before taking action.
On PR close, Custodian should only delete a branch if there's not an open PR based on it. (If there is one, maybe it can comment and say it'll be deleted later.)
Custodian should also check the branch PRs are merged into on close. If not master and no other open PRs against that branch, it can delete it as well. This lets it clean up those other branches.
If a PR intends to merge branch
B
into branchA
, but then branchA
is deleted (say, for instance, it itself was merged), Custodian will delete branchB
. We should instead give the user the opportunity to either choose a new target branch for branchB
or delete it themselves.