Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Don't delete branches with pending PRs #28

Open
ngscheurich opened this issue May 15, 2019 · 1 comment
Open

Don't delete branches with pending PRs #28

ngscheurich opened this issue May 15, 2019 · 1 comment
Labels

Comments

@ngscheurich
Copy link

If a PR intends to merge branch B into branch A, but then branch A is deleted (say, for instance, it itself was merged), Custodian will delete branch B. We should instead give the user the opportunity to either choose a new target branch for branch B or delete it themselves.

@lleger
Copy link
Member

lleger commented May 15, 2019

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.

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

No branches or pull requests

2 participants