summaryrefslogtreecommitdiffstats
path: root/services/migrations
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-10-11 06:24:07 +0200
committerGitHub <noreply@github.com>2023-10-11 06:24:07 +0200
commitebe803e514acb4eedc884226be2489ee6b4acd28 (patch)
tree3f4d38f8267142dcd0e8df7d76cd4fe04c47b85e /services/migrations
parent[skip ci] Updated translations via Crowdin (diff)
downloadforgejo-ebe803e514acb4eedc884226be2489ee6b4acd28.tar.xz
forgejo-ebe803e514acb4eedc884226be2489ee6b4acd28.zip
Penultimate round of `db.DefaultContext` refactor (#27414)
Part of #27065 --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'services/migrations')
-rw-r--r--services/migrations/gitea_uploader.go2
-rw-r--r--services/migrations/gitea_uploader_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go
index ebf22e0e40..36b5e15298 100644
--- a/services/migrations/gitea_uploader.go
+++ b/services/migrations/gitea_uploader.go
@@ -840,7 +840,7 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
pr, ok := g.prCache[issue.ID]
if !ok {
var err error
- pr, err = issues_model.GetPullRequestByIssueIDWithNoAttributes(issue.ID)
+ pr, err = issues_model.GetPullRequestByIssueIDWithNoAttributes(g.ctx, issue.ID)
if err != nil {
return err
}
diff --git a/services/migrations/gitea_uploader_test.go b/services/migrations/gitea_uploader_test.go
index 4c6dfddc08..847e76d9b1 100644
--- a/services/migrations/gitea_uploader_test.go
+++ b/services/migrations/gitea_uploader_test.go
@@ -65,14 +65,14 @@ func TestGiteaUploadRepo(t *testing.T) {
assert.True(t, repo.HasWiki())
assert.EqualValues(t, repo_model.RepositoryReady, repo.Status)
- milestones, _, err := issues_model.GetMilestones(issues_model.GetMilestonesOption{
+ milestones, _, err := issues_model.GetMilestones(db.DefaultContext, issues_model.GetMilestonesOption{
RepoID: repo.ID,
State: structs.StateOpen,
})
assert.NoError(t, err)
assert.Len(t, milestones, 1)
- milestones, _, err = issues_model.GetMilestones(issues_model.GetMilestonesOption{
+ milestones, _, err = issues_model.GetMilestones(db.DefaultContext, issues_model.GetMilestonesOption{
RepoID: repo.ID,
State: structs.StateClosed,
})