diff --git a/models/repo.go b/models/repo.go index 1ba8d500e..1142c590b 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1822,6 +1822,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) }