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