Delete dev links when repository/issue/pull/branch deleted

This commit is contained in:
Lunny Xiao
2024-08-29 12:13:49 -07:00
parent e64f2322de
commit 6b829f77a3
5 changed files with 21 additions and 2 deletions
+4
View File
@@ -114,6 +114,10 @@ func HookPostReceive(ctx *gitea_context.PrivateContext) {
})
return
}
if err := issues_model.DeleteIssueDevLinkByBranchName(ctx, repo.ID, update.RefFullName.BranchName()); err != nil {
log.Error("Failed to DeleteIssueDevLinkByBranchName: %s/%s %s Error: %v", ownerName, repoName, update.RefFullName.BranchName(), err)
}
} else {
branchesToSync = append(branchesToSync, update)