aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-04-14 09:06:23 +0800
committerGitHub <noreply@github.com>2020-04-14 09:06:23 +0800
commit281029529bf98218b6c75353f2fce2d74b7ba196 (patch)
treec88354f13b20ddd024b167117c50a57cd11d92b7 /templates
parent063b1d260fa5559fac0b77c215e8b06a9c083cec (diff)
downloadgitea-281029529bf98218b6c75353f2fce2d74b7ba196.tar.gz
gitea-281029529bf98218b6c75353f2fce2d74b7ba196.zip
ui: Add MergePull comment type instead of close for merge PR (#11058)
Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/view_content/comments.tmpl14
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index dc7d2db3c6..da1483ec37 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -7,7 +7,7 @@
13 = STOP_TRACKING, 14 = ADD_TIME_MANUAL, 16 = ADDED_DEADLINE, 17 = MODIFIED_DEADLINE,
18 = REMOVED_DEADLINE, 19 = ADD_DEPENDENCY, 20 = REMOVE_DEPENDENCY, 21 = CODE,
22 = REVIEW, 23 = ISSUE_LOCKED, 24 = ISSUE_UNLOCKED, 25 = TARGET_BRANCH_CHANGED,
- 26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST -->
+ 26 = DELETE_TIME_MANUAL, 27 = REVIEW_REQUEST, 28 = MERGE_PULL_REQUEST -->
{{if eq .Type 0}}
<div class="timeline-item comment" id="{{.HashTag}}">
{{if .OriginalAuthor }}
@@ -84,6 +84,18 @@
</a>
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
</div>
+ {{else if eq .Type 28}}
+ <div class="timeline-item event" id="{{.HashTag}}">
+ <span class="badge purple">{{svg "octicon-git-merge" 16}}</span>
+ <a class="ui avatar image" href="{{.Poster.HomeLink}}">
+ <img src="{{.Poster.RelAvatarLink}}">
+ </a>
+ <span class="text grey">
+ <a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
+ {{$link := printf "%s/commit/%s" $.Repository.HTMLURL $.Issue.PullRequest.MergedCommitID}}
+ {{$.i18n.Tr "repo.issues.pull_merged_at" $link (ShortSha $.Issue.PullRequest.MergedCommitID) $.BaseTarget $createdStr | Str2html}}
+ </span>
+ </div>
{{else if eq .Type 3 5 6}}
{{ $refFrom:= "" }}
{{if ne .RefRepoID .Issue.RepoID}}