repo: clean up webhook and hook_task when delete repository (#5239)

pull/5293/head
奶爸 2018-06-11 21:35:38 +08:00 committed by 无闻
parent 4d18df204a
commit 806754b512
1 changed files with 2 additions and 0 deletions

View File

@ -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)
}