Skip to content

Commit 0989404

Browse files
mrsdizzielafriks
authored andcommitted
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
1 parent 9600c27 commit 0989404

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

templates/mail/issue/default.tmpl

+15-7
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,30 @@
1212
</head>
1313

1414
<body>
15-
{{if .IsMention}}<p>@{{.Doer.Name}} mentioned you:</p>{{end}}
15+
{{if .IsMention}}<p><b>@{{.Doer.Name}}</b> mentioned you:</p>{{end}}
1616
<p>
17+
{{if eq .ActionName "close"}}
18+
Closed #{{.Issue.Index}}.
19+
{{else if eq .ActionName "reopen"}}
20+
Reopened #{{.Issue.Index}}.
21+
{{else if eq .ActionName "approve"}}
22+
<b>@{{.Doer.Name}}</b> approved this pull request.
23+
{{else if eq .ActionName "reject"}}
24+
<b>@{{.Doer.Name}}</b> requested changes on this pull request.
25+
{{else if eq .ActionName "review"}}
26+
<b>@{{.Doer.Name}}</b> commented on this pull request.
27+
{{end}}
28+
1729
{{- if eq .Body ""}}
1830
{{if eq .ActionName "new"}}
1931
Created #{{.Issue.Index}}.
20-
{{else if eq .ActionName "close"}}
21-
Closed #{{.Issue.Index}}.
22-
{{else if eq .ActionName "reopen"}}
23-
Reopened #{{.Issue.Index}}.
24-
{{else if ne .ReviewComments}}
25-
Empty comment on #{{.Issue.Index}}.
2632
{{end}}
2733
{{else}}
2834
{{.Body | Str2html}}
2935
{{end -}}
3036
{{- range .ReviewComments}}
37+
<hr>
38+
In {{.TreePath}}:
3139
<div class="review">
3240
<pre>{{.Patch}}</pre>
3341
<div>{{.RenderedContent | Safe}}</div>

0 commit comments

Comments
 (0)