From cb9e91d2fb0b32740ff0e1ac73be2814a68d5b52 Mon Sep 17 00:00:00 2001 From: TheClashFruit Date: Sun, 3 Dec 2023 12:15:56 +0100 Subject: [PATCH] feat: issue template --- README.md | 1 + issue/default.tmpl | 179 +++++++++++++++++++++++++++++++++++++++++++++ src/default.html | 48 ++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 issue/default.tmpl create mode 100644 src/default.html diff --git a/README.md b/README.md index 247b06c..ccd5f4e 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,5 @@ Email templates for Forgejo/Gitea. ## Installion + Clone this repo into `custom/templates/mail` and restart Forgejo/Gitea. \ No newline at end of file diff --git a/issue/default.tmpl b/issue/default.tmpl new file mode 100644 index 0000000..6fc7a92 --- /dev/null +++ b/issue/default.tmpl @@ -0,0 +1,179 @@ +[{{.Repo}}] @{{.Doer.Name}} +{{if eq .ActionName "new"}} + created +{{else if eq .ActionName "comment"}} + commented on +{{else if eq .ActionName "close"}} + closed +{{else if eq .ActionName "reopen"}} + reopened +{{else}} + updated +{{end}} +{{if eq .ActionType "issue"}} + issue +{{else}} + pull request +{{end}} +#{{.Issue.Index}}: {{.Issue.Title}} +------------ + + + + + + + + + {{.Subject}} + + + + + + + + + + + + diff --git a/src/default.html b/src/default.html new file mode 100644 index 0000000..86d0b31 --- /dev/null +++ b/src/default.html @@ -0,0 +1,48 @@ + + + + + {{.Subject}} + + + + +
+ +
+

+ @{{.Doer.Name}} + + {{if not (eq .Doer.FullName "")}} + ({{.Doer.FullName}}) + {{end}} + {{if eq .ActionName "new"}} + created + {{else if eq .ActionName "close"}} + closed + {{else if eq .ActionName "reopen"}} + reopened + {{else}} + updated + {{end}} +

+ {{if not (eq .Body "")}} +

+ {{.Body | Str2html}} +

+ {{end}} + Visit Issue +
+
+

{{AppName}}

+

+ {{if .IsMention}} + You are receiving this because @{{.Doer.Name}} mentioned you. + {{end}} +

+
+
+ +