CI: add log for branch deletion (#60647)

* add log for branch deletion
* return an err when branch deletion fails
This commit is contained in:
Kevin Minehart
2022-12-21 19:27:49 +00:00
committed by GitHub
parent a16ca209fb
commit dc00f6dbe3
2 changed files with 6 additions and 3 deletions
+1 -2
View File
@@ -105,8 +105,7 @@ func AddLabelToPR(ctx context.Context, client LabelsService, prID int, newLabel
func DeleteEnterpriseBranch(ctx context.Context, client GitService, branchName string) error {
ref := "heads/" + branchName
_, err := client.DeleteRef(ctx, RepoOwner, EnterpriseRepo, ref)
if err != nil {
if _, err := client.DeleteRef(ctx, RepoOwner, EnterpriseRepo, ref); err != nil {
return err
}