mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-23 06:45:21 +02:00
refactor: remove Ctx field from git.Repository (#38500)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user