diff options
Diffstat (limited to 'models/pull.go')
-rw-r--r-- | models/pull.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/models/pull.go b/models/pull.go index 60ccb144f5..b41fb004e1 100644 --- a/models/pull.go +++ b/models/pull.go @@ -353,14 +353,17 @@ func (pr *PullRequest) GetLastCommitStatus() (status *CommitStatus, err error) { return nil, err } - repo := pr.HeadRepo lastCommitID, err := headGitRepo.GetBranchCommitID(pr.HeadBranch) if err != nil { return nil, err } - var statusList []*CommitStatus - statusList, err = GetLatestCommitStatus(repo, lastCommitID, 0) + err = pr.LoadBaseRepo() + if err != nil { + return nil, err + } + + statusList, err := GetLatestCommitStatus(pr.BaseRepo, lastCommitID, 0) if err != nil { return nil, err } |