2019-11-07 13:34:28 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>{{.Subject}}</title>
|
2020-01-03 17:13:22 +00:00
|
|
|
|
2019-11-15 12:59:21 +00:00
|
|
|
<style>
|
2020-01-27 22:35:34 +00:00
|
|
|
blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid grey; color: #777}
|
2020-01-03 17:13:22 +00:00
|
|
|
.footer { font-size:small; color:#666;}
|
|
|
|
{{if .ReviewComments}}
|
|
|
|
.review { padding-left: 1em; margin: 1em 0; }
|
|
|
|
.review > pre { padding: 1em; border-left: 1px solid grey; }
|
|
|
|
{{end}}
|
2019-11-15 12:59:21 +00:00
|
|
|
</style>
|
2020-01-03 17:13:22 +00:00
|
|
|
|
2019-11-07 13:34:28 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2021-06-23 12:33:21 +00:00
|
|
|
{{if .IsMention}}<p>{{.i18n.Tr "mail.issue.x_mentioned_you" .Doer.Name | Str2html}}</p>{{end}}
|
2020-06-12 08:56:31 +00:00
|
|
|
{{if eq .ActionName "push"}}
|
2020-05-20 12:47:24 +00:00
|
|
|
<p>
|
|
|
|
{{if .Comment.IsForcePush}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{$oldCommitUrl := printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.OldCommit}}
|
|
|
|
{{$oldShortSha := ShortSha .Comment.OldCommit}}
|
|
|
|
{{$oldCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" $oldCommitUrl $oldShortSha}}
|
|
|
|
|
|
|
|
{{$newCommitUrl := printf "%s%s/%s/commit/%s" AppUrl .Comment.Issue.PullRequest.BaseRepo.OwnerName .Comment.Issue.PullRequest.BaseRepo.Name .Comment.NewCommit}}
|
|
|
|
{{$newShortSha := ShortSha .Comment.NewCommit}}
|
|
|
|
{{$newCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" $newCommitUrl $newShortSha}}
|
|
|
|
|
|
|
|
{{.i18n.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink | Str2html}}
|
2020-05-20 12:47:24 +00:00
|
|
|
{{else}}
|
2021-07-14 13:06:09 +00:00
|
|
|
{{.i18n.Tr (TrN .i18n.Lang .Comment.Commits.Len "mail.issue.action.push_1" "mail.issue.action.push_n") .Doer.Name .Comment.Issue.PullRequest.HeadBranch .Comment.Commits.Len | Str2html}}
|
2020-05-20 12:47:24 +00:00
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
{{end}}
|
2019-11-07 13:34:28 +00:00
|
|
|
<p>
|
2019-12-31 19:30:46 +00:00
|
|
|
{{if eq .ActionName "close"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.close" .Doer.Name .Issue.Index | Str2html}}
|
2019-12-31 19:30:46 +00:00
|
|
|
{{else if eq .ActionName "reopen"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index | Str2html}}
|
2020-01-03 17:13:22 +00:00
|
|
|
{{else if eq .ActionName "merge"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch | Str2html}}
|
2019-12-31 19:30:46 +00:00
|
|
|
{{else if eq .ActionName "approve"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.approve" .Doer.Name | Str2html}}
|
2019-12-31 19:30:46 +00:00
|
|
|
{{else if eq .ActionName "reject"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.reject" .Doer.Name | Str2html}}
|
2019-12-31 19:30:46 +00:00
|
|
|
{{else if eq .ActionName "review"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.review" .Doer.Name | Str2html}}
|
2021-02-11 17:32:25 +00:00
|
|
|
{{else if eq .ActionName "review_dismissed"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name | Str2html}}
|
2021-06-23 04:14:22 +00:00
|
|
|
{{else if eq .ActionName "ready_for_review"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.ready_for_review" .Doer.Name | Str2html}}
|
2019-12-31 19:30:46 +00:00
|
|
|
{{end}}
|
|
|
|
|
2019-11-07 13:34:28 +00:00
|
|
|
{{- if eq .Body ""}}
|
|
|
|
{{if eq .ActionName "new"}}
|
2021-06-23 12:33:21 +00:00
|
|
|
{{.i18n.Tr "mail.issue.action.new" .Doer.Name .Issue.Index | Str2html}}
|
2019-11-07 13:34:28 +00:00
|
|
|
{{end}}
|
|
|
|
{{else}}
|
|
|
|
{{.Body | Str2html}}
|
|
|
|
{{end -}}
|
2019-11-15 12:59:21 +00:00
|
|
|
{{- range .ReviewComments}}
|
2019-12-31 19:30:46 +00:00
|
|
|
<hr>
|
2021-09-07 02:06:59 +00:00
|
|
|
{{$.i18n.Tr "mail.issue.in_tree_path" .TreePath}}
|
2019-11-15 12:59:21 +00:00
|
|
|
<div class="review">
|
|
|
|
<pre>{{.Patch}}</pre>
|
|
|
|
<div>{{.RenderedContent | Safe}}</div>
|
|
|
|
</div>
|
2020-05-20 12:47:24 +00:00
|
|
|
{{end -}}
|
2020-06-12 08:56:31 +00:00
|
|
|
{{if eq .ActionName "push"}}
|
2020-05-20 12:47:24 +00:00
|
|
|
{{ $r:= List .Comment.Commits}}
|
|
|
|
<ul>
|
|
|
|
{{range $r}}
|
|
|
|
<li>
|
|
|
|
<a href="{{AppUrl}}{{$.Comment.Issue.PullRequest.BaseRepo.OwnerName}}/{{$.Comment.Issue.PullRequest.BaseRepo.Name}}/commit/{{.ID}}">
|
|
|
|
{{ShortSha .ID.String}}
|
|
|
|
</a> - {{.Summary}}
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
{{end}}
|
2019-11-07 13:34:28 +00:00
|
|
|
</p>
|
2020-01-03 17:13:22 +00:00
|
|
|
<div class="footer">
|
2019-11-07 13:34:28 +00:00
|
|
|
<p>
|
|
|
|
---
|
|
|
|
<br>
|
2021-06-23 12:33:21 +00:00
|
|
|
<a href="{{.Link}}">{{.i18n.Tr "mail.view_it_on" AppName}}</a>.
|
2019-11-07 13:34:28 +00:00
|
|
|
</p>
|
2020-01-03 17:13:22 +00:00
|
|
|
</div>
|
2019-11-07 13:34:28 +00:00
|
|
|
</body>
|
|
|
|
</html>
|