1
1
mirror of https://github.com/go-gitea/gitea synced 2025-10-28 18:08:25 +00:00

Merge branch 'main' into feature/bots

This commit is contained in:
Jason Song
2022-12-06 16:39:06 +08:00
committed by GitHub
15 changed files with 11 additions and 21 deletions

View File

@@ -997,12 +997,7 @@ func NewIssueWithIndex(ctx context.Context, doer *user_model.User, opts NewIssue
}
}
if opts.IsPull {
_, err = e.Exec("UPDATE `repository` SET num_pulls = num_pulls + 1 WHERE id = ?", opts.Issue.RepoID)
} else {
_, err = e.Exec("UPDATE `repository` SET num_issues = num_issues + 1 WHERE id = ?", opts.Issue.RepoID)
}
if err != nil {
if err := repo_model.UpdateRepoIssueNumbers(ctx, opts.Issue.RepoID, opts.IsPull, false); err != nil {
return err
}