From 806754b512f52937fa6bdd6df54e1be15408c22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=B6=E7=88=B8?= <1@5.nu> Date: Mon, 11 Jun 2018 21:35:38 +0800 Subject: [PATCH] repo: clean up webhook and hook_task when delete repository (#5239) --- models/repo.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/repo.go b/models/repo.go index 909af1d87..58bc8da8b 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1452,6 +1452,8 @@ func DeleteRepository(uid, repoID int64) error { &PullRequest{BaseRepoID: repoID}, &ProtectBranch{RepoID: repoID}, &ProtectBranchWhitelist{RepoID: repoID}, + &Webhook{RepoID: repoID}, + &HookTask{RepoID: repoID}, ); err != nil { return fmt.Errorf("deleteBeans: %v", err) }