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

This commit is contained in:
wxiaoguang authored and GitHub committed 2026-07-17 18:44:31 +08:00
1 parent 2c8e99bbf7
commit 5b078f72aa
235 files changed
+1234 -1258

No files matched your search

@@ -78,7 +78,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
objectFormat := git.ObjectFormatFromName(repo.ObjectFormatName)
commit, err := gitRepo.GetCommit(sha)
commit, err := gitRepo.GetCommit(ctx, sha)
if err != nil {
return fmt.Errorf("GetCommit[%s]: %w", sha, err)
}
@@ -104,7 +104,7 @@ func CreateCommitStatus(ctx context.Context, repo *repo_model.Repository, creato
notify.CreateCommitStatus(ctx, repo, repo_module.CommitToPushCommit(commit), creator, status)
defaultBranchCommit, err := gitRepo.GetBranchCommit(repo.DefaultBranch)
defaultBranchCommit, err := gitRepo.GetBranchCommit(ctx, repo.DefaultBranch)
if err != nil {
return fmt.Errorf("GetBranchCommit[%s]: %w", repo.DefaultBranch, err)
}