diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index f1171df08..5248f9806 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1429,6 +1429,7 @@ compare.compare_head = compare pulls.desc = Enable pull requests and code reviews. pulls.new = New Pull Request +pulls.view = View Pull Request pulls.compare_changes = New Pull Request pulls.compare_changes_desc = Select the branch to merge into and the branch to pull from. pulls.compare_base = merge into diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index c540cbc08..3b016b15f 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -735,6 +735,10 @@ func CompareDiff(ctx *context.Context) { } } else { ctx.Data["HasPullRequest"] = true + if err := pr.LoadIssue(); err != nil { + ctx.ServerError("LoadIssue", err) + return + } ctx.Data["PullRequest"] = pr ctx.HTML(http.StatusOK, tplCompareDiff) return diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl index 51198f4eb..4517f0029 100644 --- a/templates/repo/diff/compare.tmpl +++ b/templates/repo/diff/compare.tmpl @@ -187,8 +187,22 @@ {{end}} {{else if and .PageIsComparePull (gt .CommitCount 0)}} {{if .HasPullRequest}} -