Move all checks into DeleteBranch and PushUpdate

This commit is contained in:
Lunny Xiao
2024-11-09 18:07:58 -08:00
parent 75623936e9
commit e70e375996
8 changed files with 26 additions and 76 deletions
+1 -1
View File
@@ -306,7 +306,7 @@ func handlePullRequestAutoMerge(pullID int64, sha string) {
}
if pr.Flow == issues_model.PullRequestFlowGithub && scheduledPRM.DeleteBranchAfterMerge {
if err := repo_service.DeletePullRequestHeadBranch(ctx, pr, doer, headGitRepo); err != nil {
if err := repo_service.DeleteBranch(ctx, doer, pr.HeadRepo, headGitRepo, pr.HeadBranch, pr); err != nil {
log.Error("DeletePullRequestHeadBranch: %v", err)
}
}