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

Delete the PR branch after merging #2

Open
contolini opened this issue Aug 10, 2016 · 0 comments
Open

Delete the PR branch after merging #2

contolini opened this issue Aug 10, 2016 · 0 comments

Comments

@contolini
Copy link
Member

Via @Scotchester. See http://mikedeboer.github.io/node-github/#api-gitdata-deleteReference. The ref would be /heads/<branch-name>.

Before deleting the branch we should check that the base fork and head fork are the same AND that the head branch is disposable. That is, if someone is merging canary into master, they probably don't want to delete canary afterward if it's their permanent dev branch. If they're smart they'd make canary protected in GH so that it can't be deleted but we shouldn't rely on that. Perhaps we can view the repo's history to see if the branch has been used in the past and if it hasn't it means it's safe to delete?

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

No branches or pull requests

1 participant