Open runemadsen opened 7 years ago
On the delete a branch, it should throw an error if there are unmerged commits, unless you explictly pass another variable that confirms it. So, in pseudo code, I want to do something like this:
func deleteBranch( repo string, deleteIfUnmergedCommits bool) {
# All the stuff to get the branch goes here
// Do a bunch of stuff to get the branch and figure out if there are any unmerged commits
if (branchHasUnmergedCommits) {
if (deleteIfUnmergedCommits) {
# delete the branch
} else {
return errors.New("This branch has unmerged commits")
}
} else {
# delete the branch since there are no unmerged commits
}
}
Oh, and one more function I posted into chat, but will make an issue for: