From 0989404d2ff1ac4aa0d82e05158f4481474b268e Mon Sep 17 00:00:00 2001 From: mrsdizzie Date: Tue, 31 Dec 2019 14:30:46 -0500 Subject: [PATCH] Update default issue template (#9568) Some small changes: * Include text if approve/comment/request changes on PR * List filename for review comments * Bold username when mentioned This will stop empty body messages when approving PR on gitea.com --- templates/mail/issue/default.tmpl | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index 223ff7ffdc..71291c61bb 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -12,22 +12,30 @@ - {{if .IsMention}}

@{{.Doer.Name}} mentioned you:

{{end}} + {{if .IsMention}}

@{{.Doer.Name}} mentioned you:

{{end}}

+ {{if eq .ActionName "close"}} + Closed #{{.Issue.Index}}. + {{else if eq .ActionName "reopen"}} + Reopened #{{.Issue.Index}}. + {{else if eq .ActionName "approve"}} + @{{.Doer.Name}} approved this pull request. + {{else if eq .ActionName "reject"}} + @{{.Doer.Name}} requested changes on this pull request. + {{else if eq .ActionName "review"}} + @{{.Doer.Name}} commented on this pull request. + {{end}} + {{- if eq .Body ""}} {{if eq .ActionName "new"}} Created #{{.Issue.Index}}. - {{else if eq .ActionName "close"}} - Closed #{{.Issue.Index}}. - {{else if eq .ActionName "reopen"}} - Reopened #{{.Issue.Index}}. - {{else if ne .ReviewComments}} - Empty comment on #{{.Issue.Index}}. {{end}} {{else}} {{.Body | Str2html}} {{end -}} {{- range .ReviewComments}} +


+ In {{.TreePath}}:
{{.Patch}}
{{.RenderedContent | Safe}}
-- 2.39.5