mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-16 20:21:35 +00:00
refactor: remove Ctx field from git.Repository (#38500)
This commit is contained in:
@@ -100,10 +100,10 @@ func TestPullView_CodeOwner(t *testing.T) {
|
||||
|
||||
// capture the current PR head ref so we can wait for the async
|
||||
// refs/pull/N/head sync triggered by the next push to complete
|
||||
baseGitRepo, err := gitrepo.OpenRepository(t.Context(), repo)
|
||||
baseGitRepo, err := gitrepo.OpenRepository(repo)
|
||||
require.NoError(t, err)
|
||||
defer baseGitRepo.Close()
|
||||
headRefBefore, err := baseGitRepo.GetRefCommitID(pr.GetGitHeadRefName())
|
||||
headRefBefore, err := baseGitRepo.GetRefCommitID(t.Context(), pr.GetGitHeadRefName())
|
||||
require.NoError(t, err)
|
||||
|
||||
// update the file on the pr branch
|
||||
@@ -123,7 +123,7 @@ func TestPullView_CodeOwner(t *testing.T) {
|
||||
// it before evaluating code owners, otherwise the changed-file set may not
|
||||
// yet include user8-file.md and the review request would be missed
|
||||
require.Eventually(t, func() bool {
|
||||
headRefAfter, err := baseGitRepo.GetRefCommitID(pr.GetGitHeadRefName())
|
||||
headRefAfter, err := baseGitRepo.GetRefCommitID(t.Context(), pr.GetGitHeadRefName())
|
||||
return err == nil && headRefAfter != headRefBefore
|
||||
}, 30*time.Second, 100*time.Millisecond)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user