summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-09-03 14:29:36 +0800
committerLauris BH <lauris@nix.lv>2019-09-03 09:29:36 +0300
commit6ed22ffd16b80348d52daa0e1915608d307bfe87 (patch)
treef6e388ef3b28c459599e3fbdf011f839c987a9f7 /templates
parent8ae96a37ce6c02021e05ea57f9c600e19acdd6bb (diff)
downloadgitea-6ed22ffd16b80348d52daa0e1915608d307bfe87.tar.gz
gitea-6ed22ffd16b80348d52daa0e1915608d307bfe87.zip
Add merged commit id on pull view when it's merged (#8062)
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content/pull.tmpl7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 7bb3c91275..f0e39d5e37 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -49,7 +49,12 @@
<div class="ui {{if not $.LatestCommitStatus}}top attached header{{else}}attached merge-section segment{{end}}">
{{if .Issue.PullRequest.HasMerged}}
<div class="item text purple">
- {{$.i18n.Tr "repo.pulls.has_merged"}}
+ {{if .Issue.PullRequest.MergedCommitID}}
+ {{$link := printf "%s/commit/%s" $.Repository.HTMLURL .Issue.PullRequest.MergedCommitID}}
+ {{$.i18n.Tr "repo.pulls.merged_as" $link (ShortSha .Issue.PullRequest.MergedCommitID) | Safe}}
+ {{else}}
+ {{$.i18n.Tr "repo.pulls.has_merged"}}
+ {{end}}
</div>
{{if .IsPullBranchDeletable}}
<div class="ui divider"></div>