1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add merged commit id on pull view when it's merged (#8062)

This commit is contained in:
Lunny Xiao
2019-09-03 14:29:36 +08:00
committed by Lauris BH
parent 8ae96a37ce
commit 6ed22ffd16
2 changed files with 7 additions and 1 deletions

View File

@@ -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>