kodiak
kodiak copied to clipboard
delete branch when PR is closed
would it be possible that kodiak would delete the underlying branch of a pull request, when the pull request is closed?
we see stale branches in our repo, because devs close PRs but forget to do another click which removes the branch. all existing tools I am aware of delete the branches only on merge, but not on close.
This seems doable. Do you have an idea about what the config option would be? Maybe we need a new config section because I don't think it fits into the [merge] section.
I feel it could be a [close] section.
analog to merge.delete_branch_on_merge I guess it could be close.delete_branch_on_close.
what do you think.. would kodiak delete the branch only when a automerge label is present, or everytime? for my use-case I would want it deletes the branches even when no automerge label is present.
I think an implementation for this would be similar to the logic for branch deletion on merge. We'd need to add a new config option and do something similar to delete_branch_on_merge:
https://github.com/chdsbd/kodiak/blob/2ecca4ed181432b192292084719e3796d9997812/bot/kodiak/evaluation.py#L736-L751