summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author奶爸 <1@5.nu>2018-05-21 21:30:30 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2018-05-21 21:30:30 +0800
commitd94472e89b341d55f5529b3f7d9e0c666d982659 (patch)
treea923d0763aa8d2779c40cbce5c02369251ad3c40
parent2690542adb694ce74f38d0d638e09a623c7894bb (diff)
downloadgitea-d94472e89b341d55f5529b3f7d9e0c666d982659.tar.gz
gitea-d94472e89b341d55f5529b3f7d9e0c666d982659.zip
fix #4003 (#4004)
Webhook and hook_task not cleaned up when delete repository
-rw-r--r--models/repo.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/models/repo.go b/models/repo.go
index 88e9f71742..c95c867f37 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1824,6 +1824,8 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
&PullRequest{BaseRepoID: repoID},
&RepoUnit{RepoID: repoID},
&RepoRedirect{RedirectRepoID: repoID},
+ &Webhook{RepoID: repoID},
+ &HookTask{RepoID: repoID},
); err != nil {
return fmt.Errorf("deleteBeans: %v", err)
}