summaryrefslogtreecommitdiffstats
path: root/modules/convert/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/convert/pull.go')
-rw-r--r--modules/convert/pull.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/convert/pull.go b/modules/convert/pull.go
index e522bee787..87eabcf53a 100644
--- a/modules/convert/pull.go
+++ b/modules/convert/pull.go
@@ -68,7 +68,7 @@ func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest {
Name: pr.BaseBranch,
Ref: pr.BaseBranch,
RepoID: pr.BaseRepoID,
- Repository: pr.BaseRepo.APIFormat(models.AccessModeNone),
+ Repository: ToRepo(pr.BaseRepo, models.AccessModeNone),
},
Head: &api.PRBranchInfo{
Name: pr.HeadBranch,
@@ -97,7 +97,7 @@ func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest {
if pr.HeadRepo != nil {
apiPullRequest.Head.RepoID = pr.HeadRepo.ID
- apiPullRequest.Head.Repository = pr.HeadRepo.APIFormat(models.AccessModeNone)
+ apiPullRequest.Head.Repository = ToRepo(pr.HeadRepo, models.AccessModeNone)
headGitRepo, err := git.OpenRepository(pr.HeadRepo.RepoPath())
if err != nil {