diff options
author | Giteabot <teabot@gitea.io> | 2023-09-26 01:24:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-25 19:24:35 +0200 |
commit | fc7d3f73155b7ab9e2440aef0195c80b2ad72bbd (patch) | |
tree | 694e6e1da5a0d26d546f78b95e5841d7d64278e7 /models/issues/issue_index.go | |
parent | 597b04fe2f4f032af3c2a4db30bbdf1437a19f34 (diff) | |
download | gitea-fc7d3f73155b7ab9e2440aef0195c80b2ad72bbd.tar.gz gitea-fc7d3f73155b7ab9e2440aef0195c80b2ad72bbd.zip |
Another round of `db.DefaultContext` refactor (#27103) (#27262)
Backport #27103 by @JakobDev
Part of #27065
Co-authored-by: JakobDev <jakobdev@gmx.de>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'models/issues/issue_index.go')
-rw-r--r-- | models/issues/issue_index.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/models/issues/issue_index.go b/models/issues/issue_index.go index b480cc683f..16274d0ef0 100644 --- a/models/issues/issue_index.go +++ b/models/issues/issue_index.go @@ -3,12 +3,16 @@ package issues -import "code.gitea.io/gitea/models/db" +import ( + "context" + + "code.gitea.io/gitea/models/db" +) // RecalculateIssueIndexForRepo create issue_index for repo if not exist and // update it based on highest index of existing issues assigned to a repo -func RecalculateIssueIndexForRepo(repoID int64) error { - ctx, committer, err := db.TxContext(db.DefaultContext) +func RecalculateIssueIndexForRepo(ctx context.Context, repoID int64) error { + ctx, committer, err := db.TxContext(ctx) if err != nil { return err } |