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
@@ -47,7 +47,7 @@ func SyncRepoTags(ctx context.Context, repoID int64) error {
return err
}
gitRepo, err := gitrepo.OpenRepository(ctx, repo)
gitRepo, err := gitrepo.OpenRepository(repo)
if err != nil {
return err
}
@@ -181,7 +181,7 @@ func (shortRelease) TableName() string {
// repositories like https://github.com/vim/vim (with over 13000 tags).
func SyncReleasesWithTags(ctx context.Context, repo *repo_model.Repository, gitRepo *git.Repository) ([]*SyncResult, error) {
log.Debug("SyncReleasesWithTags: in Repo[%d:%s/%s]", repo.ID, repo.OwnerName, repo.Name)
tags, _, err := gitRepo.GetTagInfos(0, 0)
tags, _, err := gitRepo.GetTagInfos(ctx, 0, 0)
if err != nil {
return nil, fmt.Errorf("unable to GetTagInfos in pull-mirror Repo[%d:%s/%s]: %w", repo.ID, repo.OwnerName, repo.Name, err)
}