From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- templates/mail/issue/assigned.tmpl | 28 ++++++++++++ templates/mail/issue/default.tmpl | 90 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 templates/mail/issue/assigned.tmpl create mode 100644 templates/mail/issue/default.tmpl (limited to 'templates/mail/issue') diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl new file mode 100644 index 0000000..f8ad62a --- /dev/null +++ b/templates/mail/issue/assigned.tmpl @@ -0,0 +1,28 @@ + + + + + + + +{{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} +{{$link := HTMLFormat "#%d" .Link .Issue.Index}} + +

+ {{if .IsPull}} + {{.locale.Tr "mail.issue_assigned.pull" .Doer.Name $link $repo_url}} + {{else}} + {{.locale.Tr "mail.issue_assigned.issue" .Doer.Name $link $repo_url}} + {{end}} +

+ + + diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl new file mode 100644 index 0000000..a94a10e --- /dev/null +++ b/templates/mail/issue/default.tmpl @@ -0,0 +1,90 @@ + + + + + + + + + + + {{if .IsMention}}

{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}

{{end}} + {{if eq .ActionName "push"}} +

+ {{if .Comment.IsForcePush}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} + {{$oldShortSha := ShortSha .Comment.OldCommit}} + {{$oldCommitLink := HTMLFormat "%[2]s" $oldCommitUrl $oldShortSha}} + + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} + {{$newShortSha := ShortSha .Comment.NewCommit}} + {{$newCommitLink := HTMLFormat "%[2]s" $newCommitUrl $newShortSha}} + + {{.locale.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink}} + {{else}} + {{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits)}} + {{end}} +

+ {{end}} +

+ {{if eq .ActionName "close"}} + {{.locale.Tr "mail.issue.action.close" .Doer.Name .Issue.Index}} + {{else if eq .ActionName "reopen"}} + {{.locale.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index}} + {{else if eq .ActionName "merge"}} + {{.locale.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch}} + {{else if eq .ActionName "approve"}} + {{.locale.Tr "mail.issue.action.approve" .Doer.Name}} + {{else if eq .ActionName "reject"}} + {{.locale.Tr "mail.issue.action.reject" .Doer.Name}} + {{else if eq .ActionName "review"}} + {{.locale.Tr "mail.issue.action.review" .Doer.Name}} + {{else if eq .ActionName "review_dismissed"}} + {{.locale.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name}} + {{else if eq .ActionName "ready_for_review"}} + {{.locale.Tr "mail.issue.action.ready_for_review" .Doer.Name}} + {{end}} + + {{- if eq .Body ""}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} + {{end}} + {{else}} + {{.Body}} + {{end -}} + {{- range .ReviewComments}} +


+ {{$.locale.Tr "mail.issue.in_tree_path" .TreePath}} +
+
{{.Patch}}
+
{{.RenderedContent}}
+
+ {{end -}} + {{if eq .ActionName "push"}} + + {{end}} +

+ + + -- cgit v1.2.3