Skip to content

Commit

Permalink
Update default issue template (#9568)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrsdizzie authored and lafriks committed Dec 31, 2019
1 parent 9600c27 commit 0989404
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions templates/mail/issue/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@
</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>
Expand Down

0 comments on commit 0989404

Please sign in to comment.