Browse Source

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

奶爸 6 years ago
parent
commit
806754b512
1 changed files with 2 additions and 0 deletions
  1. 2 0
      models/repo.go

+ 2 - 0
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)
 	}