CI: add log for branch deletion (#60647)
* add log for branch deletion * return an err when branch deletion fails
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user