summaryrefslogtreecommitdiffstats
path: root/models/issues/pull.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-03-08 15:30:10 +0800
committerGitHub <noreply@github.com>2024-03-08 15:30:10 +0800
commit25b842df261452a29570ba89ffc3a4842d73f68c (patch)
tree225cddc07630f491e3efb9976fb57d0d31adb38a /models/issues/pull.go
parenta1f5dd767729e30d07ab42fda80c19f30a72679f (diff)
downloadgitea-25b842df261452a29570ba89ffc3a4842d73f68c.tar.gz
gitea-25b842df261452a29570ba89ffc3a4842d73f68c.zip
Move get/set default branch from git package to gitrepo package to hide repopath (#29126)
Diffstat (limited to 'models/issues/pull.go')
-rw-r--r--models/issues/pull.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/models/issues/pull.go b/models/issues/pull.go
index 7d299eac27..80b149da5c 100644
--- a/models/issues/pull.go
+++ b/models/issues/pull.go
@@ -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
}