diff options
author | 奶爸 <1@5.nu> | 2018-05-21 21:30:30 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-21 21:30:30 +0800 |
commit | d94472e89b341d55f5529b3f7d9e0c666d982659 (patch) | |
tree | a923d0763aa8d2779c40cbce5c02369251ad3c40 | |
parent | 2690542adb694ce74f38d0d638e09a623c7894bb (diff) | |
download | gitea-d94472e89b341d55f5529b3f7d9e0c666d982659.tar.gz gitea-d94472e89b341d55f5529b3f7d9e0c666d982659.zip |
fix #4003 (#4004)
Webhook and hook_task not cleaned up when delete repository
-rw-r--r-- | models/repo.go | 2 |
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) } |