Delete Labels & IssueLabels on Repo Delete too (#15039) (#15051)

* Doctor: find IssueLabels without existing label

* Repo Delete: delete labels & issue_labels too
This commit is contained in:
6543 2021-03-19 22:13:39 +01:00 committed by GitHub
parent 909f2be99d
commit 70e4134130
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 0 deletions

View file

@ -1729,6 +1729,10 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
return fmt.Errorf("deleteBeans: %v", err)
}
if err := deleteLabelsByRepoID(sess, repoID); err != nil {
return err
}
// Delete Issues and related objects
var attachmentPaths []string
if attachmentPaths, err = deleteIssuesByRepoID(sess, repoID); err != nil {