summaryrefslogtreecommitdiffstats
path: root/models/issues
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-01-09 11:50:54 +0800
committerGitHub <noreply@github.com>2023-01-09 11:50:54 +0800
commit7adc2de46404e32ed33f999d308ed56232cdfea5 (patch)
tree2404a22b5fa8a941eb5bfd16fd717fab29d899e4 /models/issues
parentb878155b8741c2769b6aa50a80609c36822451c9 (diff)
downloadgitea-7adc2de46404e32ed33f999d308ed56232cdfea5.tar.gz
gitea-7adc2de46404e32ed33f999d308ed56232cdfea5.zip
Use context parameter in models/git (#22367)
After #22362, we can feel free to use transactions without `db.DefaultContext`. And there are still lots of models using `db.DefaultContext`, I think we should refactor them carefully and one by one. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'models/issues')
-rw-r--r--models/issues/comment.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issues/comment.go b/models/issues/comment.go
index 612f17aa5a..2dcbc7d819 100644
--- a/models/issues/comment.go
+++ b/models/issues/comment.go
@@ -772,7 +772,7 @@ func (c *Comment) LoadPushCommits(ctx context.Context) (err error) {
}
defer closer.Close()
- c.Commits = git_model.ConvertFromGitCommit(gitRepo.GetCommitsFromIDs(data.CommitIDs), c.Issue.Repo)
+ c.Commits = git_model.ConvertFromGitCommit(ctx, gitRepo.GetCommitsFromIDs(data.CommitIDs), c.Issue.Repo)
c.CommitsNum = int64(len(c.Commits))
}