Delete Source Branch After Merge
This commit is contained in:
parent
5222bde661
commit
ebbcdeeb30
6
main.go
6
main.go
@ -152,6 +152,12 @@ func threatRepo(baseBranchRule glob.Glob, client *gitlab.Client, repo *gitlab.Pr
|
|||||||
fmt.Printf(" pull '%s' can not be merged: %v\n", pullList[0].WebURL, err)
|
fmt.Printf(" pull '%s' can not be merged: %v\n", pullList[0].WebURL, err)
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf(" pull '%s' got merged successfully\n", pull.WebURL)
|
fmt.Printf(" pull '%s' got merged successfully\n", pull.WebURL)
|
||||||
|
|
||||||
|
if err, _ := client.Branches.DeleteBranch(repo.ID, baseBranch.Name); err != nil {
|
||||||
|
fmt.Printf(" branch '%s' can not be deleted: %v\n", baseBranch.Name, err)
|
||||||
|
} else {
|
||||||
|
fmt.Printf(" branch '%s' successfully deleted\n", baseBranch.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// since we had a match go to next repo ...
|
// since we had a match go to next repo ...
|
||||||
|
Loading…
Reference in New Issue
Block a user