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