refactor: remove Ctx field from git.Repository (#38500)

This commit is contained in:
wxiaoguang
2026-07-17 18:44:31 +08:00
committed by GitHub
parent 2c8e99bbf7
commit 5b078f72aa
235 changed files with 1234 additions and 1258 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ func TestMirrorPull(t *testing.T) {
assert.True(t, slices.ContainsFunc(mirrorRepo.Units, func(u *repo_model.RepoUnit) bool { return u.Type == unit.TypeReleases }))
assert.True(t, slices.ContainsFunc(mirrorRepo.Units, func(u *repo_model.RepoUnit) bool { return u.Type == unit.TypeWiki }))
gitRepo, err := gitrepo.OpenRepository(t.Context(), repo)
gitRepo, err := gitrepo.OpenRepository(repo)
assert.NoError(t, err)
defer gitRepo.Close()
@@ -79,7 +79,7 @@ func TestMirrorPull(t *testing.T) {
assert.NoError(t, err)
assert.Zero(t, initCount) // no sync yet, so even though there is a tag in source repo, the mirror's release table is still empty
assert.NoError(t, release_service.CreateRelease(gitRepo, &repo_model.Release{
assert.NoError(t, release_service.CreateRelease(ctx, gitRepo, &repo_model.Release{
RepoID: repo.ID,
Repo: repo,
PublisherID: user.ID,