aboutsummaryrefslogtreecommitdiffstats
path: root/models/issues/pull.go
diff options
context:
space:
mode:
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
}