From d94472e89b341d55f5529b3f7d9e0c666d982659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=B6=E7=88=B8?= <1@5.nu> Date: Mon, 21 May 2018 21:30:30 +0800 Subject: [PATCH] fix #4003 (#4004) Webhook and hook_task not cleaned up when delete repository --- models/repo.go | 2 ++ 1 file changed, 2 insertions(+) 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) }