summaryrefslogtreecommitdiffstats
path: root/templates/mail
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-08-23 23:03:18 +0800
committerGitHub <noreply@github.com>2020-08-23 16:03:18 +0100
commite7d65cbc6e50d70753f7228c46cbff0cffde7eba (patch)
treeb66f497a44ef729a4fc33c3ab2663a958d3e7b0f /templates/mail
parente429c1164ec68b154b7f06db2c2e04dd25bad094 (diff)
downloadgitea-e7d65cbc6e50d70753f7228c46cbff0cffde7eba.tar.gz
gitea-e7d65cbc6e50d70753f7228c46cbff0cffde7eba.zip
Add email notify for new release (#12463)
* Add email notify for new release Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'templates/mail')
-rw-r--r--templates/mail/release.tmpl56
1 files changed, 56 insertions, 0 deletions
diff --git a/templates/mail/release.tmpl b/templates/mail/release.tmpl
new file mode 100644
index 0000000000..bb0eb17a56
--- /dev/null
+++ b/templates/mail/release.tmpl
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>{{.Subject}}</title>
+
+ <style>
+ blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid grey; color: #777}
+ .footer { font-size:small; color:#666;}
+ </style>
+
+</head>
+
+<body>
+ <p><b>@{{.Release.Publisher.Name}}</b> released <a href="{{.Release.HTMLURL}}">{{.Release.TagName}}</a>
+ in <a href="{{AppUrl}}{{.Release.Repo.OwnerName}}/{{.Release.Repo.Name}}">{{.Release.Repo.FullName}} </p>
+ <h4>Title: {{.Release.Title}}</h4>
+ <p>
+ Note: <br>
+ {{- if eq .Release.RenderedNote ""}}
+ {{else}}
+ {{.Release.RenderedNote | Str2html}}
+ {{end -}}
+ </p>
+ <br><br>
+ <p>
+ ---
+ <br>
+ Downloads:
+ <ul>
+ <li>
+ <a href="{{AppUrl}}{{.Release.Repo.OwnerName}}/{{.Release.Repo.Name}}/archive/{{.Release.TagName | EscapePound}}.zip" rel="nofollow"><strong> Source Code (ZIP)</strong></a>
+ </li>
+ <li>
+ <a href="{{AppUrl}}{{.Release.Repo.OwnerName}}/{{.Release.Repo.Name}}/archive/{{.Release.TagName | EscapePound}}.tar.gz"><strong> Source Code (TAR.GZ)</strong></a>
+ </li>
+ {{if .Release.Attachments}}
+ {{range .Release.Attachments}}
+ <li>
+ <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
+ <strong>{{.Name}} ({{.Size | FileSize}})</strong>
+ </a>
+ </li>
+ {{end}}
+ {{end}}
+ </ul>
+ </p>
+ <div class="footer">
+ <p>
+ ---
+ <br>
+ <a href="{{.Release.HTMLURL}}">View it on {{AppName}}</a>.
+ </p>
+ </div>
+</body>
+</html>