]> source.dussan.org Git - gitea.git/commitdiff
Update default issue template (#9568)
authormrsdizzie <info@mrsdizzie.com>
Tue, 31 Dec 2019 19:30:46 +0000 (14:30 -0500)
committerLauris BH <lauris@nix.lv>
Tue, 31 Dec 2019 19:30:46 +0000 (21:30 +0200)
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

index 223ff7ffdc36b3bbd8d5103358d3e0aa866f58e9..71291c61bb511e8b51910cdc42c4b77065339238 100644 (file)
 </head>
 
 <body>
-       {{if .IsMention}}<p>@{{.Doer.Name}} mentioned you:</p>{{end}}
+       {{if .IsMention}}<p><b>@{{.Doer.Name}}</b> mentioned you:</p>{{end}}
        <p>
+               {{if eq .ActionName "close"}}
+                       Closed #{{.Issue.Index}}.
+               {{else if eq .ActionName "reopen"}}
+                       Reopened #{{.Issue.Index}}.
+               {{else if eq .ActionName "approve"}}
+                       <b>@{{.Doer.Name}}</b> approved this pull request.
+               {{else if eq .ActionName "reject"}}
+                       <b>@{{.Doer.Name}}</b> requested changes on this pull request.
+               {{else if eq .ActionName "review"}}
+                       <b>@{{.Doer.Name}}</b> 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}}
+                       <hr>
+                       In {{.TreePath}}:
                        <div class="review">
                                <pre>{{.Patch}}</pre>
                                <div>{{.RenderedContent | Safe}}</div>