Move get/set default branch from git package to gitrepo package to hide repopath (#29126)

This commit is contained in:
Lunny Xiao 2024-03-08 15:30:10 +08:00 committed by GitHub
parent a1f5dd7677
commit 25b842df26
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 52 additions and 63 deletions

View file

@ -901,12 +901,7 @@ func PullRequestCodeOwnersReview(ctx context.Context, pull *Issue, pr *PullReque
}
defer repo.Close()
branch, err := repo.GetDefaultBranch()
if err != nil {
return err
}
commit, err := repo.GetBranchCommit(branch)
commit, err := repo.GetBranchCommit(pr.BaseRepo.DefaultBranch)
if err != nil {
return err
}