chore: sync Gitea 28.3.0 inputs and compatibility docs
Validate / Validate (push) Successful in 3m44s
Validate / Validate (push) Successful in 3m44s
This commit is contained in:
1 parent
16b3141e09
commit
e6925fb721
8 files changed
+36
-38
No files matched your search
+9
-10
@@ -13,7 +13,8 @@ Select the recommended template release for the Gitea version you run. `[PASS]`
|
||||
|
||||
| Gitea version | Recommended template release | Status | Notes |
|
||||
|---|---|---|---|
|
||||
| 28.2.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | Mail templates, template function registrations and mail translation keys are unchanged from 28.1.0 |
|
||||
| 28.3.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | Official outer-spacing fix; this project’s themes define their own spacing and are unaffected |
|
||||
| 28.2.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | - |
|
||||
| 28.1.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | - |
|
||||
| 28.0.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | Gitea replaced the mail function `FileSize` with `FormatByteSize` |
|
||||
| 1.27.3 | [**v1.27.3**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v1.27.3) | [PASS] | Pull request push notification commit links fixed in every theme |
|
||||
@@ -37,28 +38,26 @@ This table describes changes in **Gitea**, not fixes in this template repository
|
||||
|
||||
| Gitea | Release date | Mail template changes | Impact |
|
||||
|---|---|---|---|
|
||||
| **28.2.0** | 2026-10-18 | No template interface changes | Custom-watch notification recipient rules and incoming reply token validation changed; existing templates are unaffected |
|
||||
| **28.3.0** | 2026-11-01 | Fix missing outer spacing in notification emails ([PR #40104](https://github.com/go-gitea/gitea/pull/40104)) ([PR #40111](https://github.com/go-gitea/gitea/pull/40111)) | None |
|
||||
| **28.2.0** | 2026-10-18 | Custom-watch notification recipient rules and incoming reply token validation changed; existing templates are unaffected | None |
|
||||
| **28.1.0** | 2026-10-06 | None | None |
|
||||
| **28.0.0** | 2026-09-29 | Mail function `FileSize` renamed to `FormatByteSize` ([PR](https://github.com/go-gitea/gitea/pull/39083)) | **Breaking change:** old release attachment templates fail |
|
||||
| | | Introduced `templates/mail/base/` ([PR](https://github.com/go-gitea/gitea/pull/38396)) | **Breaking change:** older Gitea versions cannot directly use the new mail templates |
|
||||
| **28.0.0** | 2026-09-29 | Mail function `FileSize` renamed to `FormatByteSize` ([PR #39083](https://github.com/go-gitea/gitea/pull/39083)) | **Breaking change:** old release attachment templates fail |
|
||||
| | | Introduced `templates/mail/base/` ([PR #38396](https://github.com/go-gitea/gitea/pull/38396)) | **Breaking change:** older Gitea versions cannot directly use the new mail templates |
|
||||
| **1.27.3** | 2026-08-29 | None | None |
|
||||
| **1.27.2** | 2026-08-14 | None | None |
|
||||
| **1.27.1** | 2026-07-27 | Bundled push template updated to use `.UserCommit.GitCommit` ([PR](https://github.com/go-gitea/gitea/pull/38467)) | **Breaking change: an existing defect remains unresolved.** Old custom pull request push templates can fail |
|
||||
| **1.27.0** | 2026-07-13 | Push commit data moved under `.UserCommit.GitCommit` ([ISSUE](https://github.com/go-gitea/gitea/issues/38469)) | **Breaking change:** old pull request push templates fail |
|
||||
| **1.27.1** | 2026-07-27 | Bundled push template updated to use `.UserCommit.GitCommit` ([PR #38467](https://github.com/go-gitea/gitea/pull/38467)) | **Breaking change: an existing defect remains unresolved.** Old custom pull request push templates can fail |
|
||||
| **1.27.0** | 2026-07-13 | Push commit data moved under `.UserCommit.GitCommit` ([ISSUE #38469](https://github.com/go-gitea/gitea/issues/38469)) | **Breaking change:** old pull request push templates fail |
|
||||
| **1.26.4** | 2026-06-21 | None | None |
|
||||
| **1.26.3** | 2026-06-20 | None | None |
|
||||
| **1.26.2** | 2026-05-20 | None | None |
|
||||
| **1.26.1** | 2026-04-22 | None | None |
|
||||
| **1.26.0** | 2026-04-19 | None | None |
|
||||
| **1.25.5** | 2026-03-10 | None | None |
|
||||
| **1.25.0** | 2025 | Custom mail paths and subject/body format changed ([PR](https://github.com/go-gitea/gitea/pull/35150)) | **Breaking change:** older template layouts are unsupported |
|
||||
| **1.25.0** | 2025 | Custom mail paths and subject/body format changed ([PR #35150](https://github.com/go-gitea/gitea/pull/35150)) | **Breaking change:** older template layouts are unsupported |
|
||||
| **≤ 1.24.x** | — | Legacy custom mail layout | [UNSUPPORTED] |
|
||||
|
||||
## Template Variable Reference
|
||||
|
||||
> [!NOTE]
|
||||
> Mail templates, context construction, template functions and translation keys were checked against the [Gitea 28.1.0 to 28.2.0 source diff](https://github.com/go-gitea/gitea/compare/v28.1.0...v28.2.0). Version 28.2.0 changes [email notification rules for custom watches](https://github.com/go-gitea/gitea/pull/39837) and [incoming email token validation](https://github.com/go-gitea/gitea/pull/39841), without changing the variables, functions or translation keys required by existing mail templates. Source build inputs are locked to v28.2.0; the published v28.1.0 templates remain usable.
|
||||
|
||||
Official templates define the context for each mail type. For specific mail templates, functions and variables used during development, refer to the official mail template documentation [1](#notes).
|
||||
|
||||
## Translation Keys
|
||||
|
||||
+3
-3
@@ -69,10 +69,10 @@ The root lock file records the Gitea tag, its commit and file SHA-256 hashes. `v
|
||||
|
||||
#### Updating the Official Version
|
||||
|
||||
Use `sync` only when reviewing a new official version. For example, to explicitly synchronize to `v28.2.0`:
|
||||
Use `sync` only when reviewing a new official version. For example, to explicitly synchronize to `v28.3.0`:
|
||||
|
||||
```bash
|
||||
go run . upstream sync --tag v28.2.0
|
||||
go run . upstream sync --tag v28.3.0
|
||||
go run . upstream verify
|
||||
go test ./...
|
||||
go run . preview all
|
||||
@@ -347,7 +347,7 @@ Use concise commit messages. The following prefixes are available as a reference
|
||||
Release tags must match the locked Gitea tag. Version labels, badges and compatibility records are maintained manually; changing official inputs does not trigger automatic version maintenance. Retain historical release assets and check documentation and compatibility records before tagging. After validation and generation of all previews, you can package manually from the repository root:
|
||||
|
||||
```bash
|
||||
python .github/scripts/package_release.py --version v28.2.0 --output build/release-review
|
||||
python .github/scripts/package_release.py --version v28.3.0 --output build/release-review
|
||||
```
|
||||
|
||||
Replace the example version with the tag in the root lock file and use an output directory without release archives of the same name. The script checks source and artifact hashes, packages themes, previews, documentation, the official license and provenance, and excludes stale theme builds.
|
||||
|
||||
@@ -126,11 +126,11 @@ Open [http://127.0.0.1:3456](http://127.0.0.1:3456). The server watches theme fi
|
||||
|
||||
## Compatibility
|
||||
|
||||
- **Latest tested:** Gitea 28.2.0
|
||||
- **Source build baseline:** Gitea 28.2.0
|
||||
- **Latest tested:** Gitea 28.3.0
|
||||
- **Source build baseline:** Gitea 28.3.0
|
||||
- **Latest release:** [v28.1.0](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/latest)
|
||||
|
||||
Gitea 28.2.0 introduces no mail template interface changes, so the published v28.1.0 templates remain compatible. Source builds use the locked v28.2.0 official inputs; see the [compatibility records](COMPATIBILITY.md).
|
||||
Gitea 28.3.0 introduces no mail template interface changes, so the published v28.1.0 templates remain compatible. Source builds use the locked v28.3.0 official inputs; see the [compatibility records](COMPATIBILITY.md).
|
||||
|
||||
## Project Directory Structure
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
| Gitea 版本 | 推荐模板版本 | 状态 | 说明 |
|
||||
|---|---|---|---|
|
||||
| 28.2.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | 邮件模板、模板函数注册及邮件翻译键与 28.1.0 一致 |
|
||||
| 28.3.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | 官方修复邮件外部间距;本项目主题自行设置间距,不受影响 |
|
||||
| 28.2.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | - |
|
||||
| 28.1.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | - |
|
||||
| 28.0.0 | [**v28.1.0**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v28.1.0) | [PASS] | Gitea 将邮件函数 `FileSize` 替换为 `FormatByteSize` |
|
||||
| 1.27.3 | [**v1.27.3**](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/tag/v1.27.3) | [PASS] | 全部主题已修复拉取请求推送通知的提交链接 |
|
||||
@@ -37,28 +38,26 @@
|
||||
|
||||
| Gitea | 发布日期 | 邮件模板变化 | 影响 |
|
||||
|---|---|---|---|
|
||||
| **28.2.0** | 2026-10-18 | 无模板接口变更 | 自定义关注的通知收件规则及入站回复令牌校验调整,不影响现有模板 |
|
||||
| **28.3.0** | 2026-11-01 | 修复通知邮件外部间距丢失问题 ([PR #40104](https://github.com/go-gitea/gitea/pull/40104))([PR #40111](https://github.com/go-gitea/gitea/pull/40111)) | 无 |
|
||||
| **28.2.0** | 2026-10-18 | 自定义关注的通知收件规则及入站回复令牌校验调整,不影响现有模板 | 无 |
|
||||
| **28.1.0** | 2026-10-06 | 无 | 无 |
|
||||
| **28.0.0** | 2026-09-29 | 邮件函数 `FileSize` 改为 `FormatByteSize` ([PR](https://github.com/go-gitea/gitea/pull/39083)) | **不兼容变更:** 旧的发布附件模板失效 |
|
||||
|||引入 templates/mail/base/ ([PR](https://github.com/go-gitea/gitea/pull/38396))| **不兼容变更:** 旧版本 Gitea 无法直接使用新版本邮件模板 |
|
||||
| **28.0.0** | 2026-09-29 | 邮件函数 `FileSize` 改为 `FormatByteSize` ([PR #39083](https://github.com/go-gitea/gitea/pull/39083)) | **不兼容变更:** 旧的发布附件模板失效 |
|
||||
|||引入 templates/mail/base/ ([PR #38396](https://github.com/go-gitea/gitea/pull/38396))| **不兼容变更:** 旧版本 Gitea 无法直接使用新版本邮件模板 |
|
||||
| **1.27.3** | 2026-08-29 | 无 | 无 |
|
||||
| **1.27.2** | 2026-08-14 | 无 | 无 |
|
||||
| **1.27.1** | 2026-07-27 | 内置推送模板改用 `.UserCommit.GitCommit`([PR](https://github.com/go-gitea/gitea/pull/38467)) | **不兼容变更:存在既有未修复缺陷** 旧的自定义拉取请求推送模板可能失效 |
|
||||
| **1.27.0** | 2026-07-13 | 推送提交数据移至 `.UserCommit.GitCommit`([ISSUE](https://github.com/go-gitea/gitea/issues/38469)) | **不兼容变更:** 旧的拉取请求推送模板失效 |
|
||||
| **1.27.1** | 2026-07-27 | 内置推送模板改用 `.UserCommit.GitCommit`([PR #38467](https://github.com/go-gitea/gitea/pull/38467)) | **不兼容变更:存在既有未修复缺陷** 旧的自定义拉取请求推送模板可能失效 |
|
||||
| **1.27.0** | 2026-07-13 | 推送提交数据移至 `.UserCommit.GitCommit`([ISSUE #38469](https://github.com/go-gitea/gitea/issues/38469)) | **不兼容变更:** 旧的拉取请求推送模板失效 |
|
||||
| **1.26.4** | 2026-06-21 | 无 | 无 |
|
||||
| **1.26.3** | 2026-06-20 | 无 | 无 |
|
||||
| **1.26.2** | 2026-05-20 | 无 | 无 |
|
||||
| **1.26.1** | 2026-04-22 | 无 | 无 |
|
||||
| **1.26.0** | 2026-04-19 | 无 | 无 |
|
||||
| **1.25.5** | 2026-03-10 | 无 | 无 |
|
||||
| **1.25.0** | 2025 | 自定义邮件路径及主题和正文格式变化([PR](https://github.com/go-gitea/gitea/pull/35150)) | **不兼容变更:** 不支持更早的模板布局 |
|
||||
| **1.25.0** | 2025 | 自定义邮件路径及主题和正文格式变化([PR #35150](https://github.com/go-gitea/gitea/pull/35150)) | **不兼容变更:** 不支持更早的模板布局 |
|
||||
| **≤ 1.24.x** | — | 旧的自定义邮件布局 | [UNSUPPORTED] |
|
||||
|
||||
## 模板变量参考
|
||||
|
||||
> [!NOTE]
|
||||
> 已对照 [Gitea 28.1.0 与 28.2.0 的源码差异](https://github.com/go-gitea/gitea/compare/v28.1.0...v28.2.0)检查邮件模板、上下文构造、模板函数和翻译键。28.2.0 调整了[自定义关注的邮件通知规则](https://github.com/go-gitea/gitea/pull/39837)和[入站邮件令牌校验](https://github.com/go-gitea/gitea/pull/39841),未改变现有邮件模板所需的变量、函数或翻译键。源码构建输入锁定为 v28.2.0,已发布的 v28.1.0 模板仍可使用。
|
||||
|
||||
各类邮件上下文由官方模板定义。开发时具体的邮件模板和函数和变量请参考官方邮件模板文档 [1](#注释)。
|
||||
|
||||
## 翻译键
|
||||
|
||||
@@ -69,10 +69,10 @@ go run . upstream verify --root "C:\Projects\GiteaMailTemplates"
|
||||
|
||||
#### 更新官方版本
|
||||
|
||||
只有需要评审新的官方版本时才使用 `sync`。例如,明确同步到 `v28.2.0`:
|
||||
只有需要评审新的官方版本时才使用 `sync`。例如,明确同步到 `v28.3.0`:
|
||||
|
||||
```bash
|
||||
go run . upstream sync --tag v28.2.0
|
||||
go run . upstream sync --tag v28.3.0
|
||||
go run . upstream verify
|
||||
go test ./...
|
||||
go run . preview all
|
||||
@@ -347,7 +347,7 @@ python -B -m unittest discover -s .github/scripts -p 'test_*.py'
|
||||
发行标签必须与锁定的 Gitea 标签一致。版本标记、徽章和兼容性记录由维护者手动更新;修改官方输入不会自动触发版本维护。历史发行附件应保留,文档和兼容性记录应在打标签前检查。完成验证并生成全部预览后,可在仓库根目录手动打包:
|
||||
|
||||
```bash
|
||||
python .github/scripts/package_release.py --version v28.2.0 --output build/release-review
|
||||
python .github/scripts/package_release.py --version v28.3.0 --output build/release-review
|
||||
```
|
||||
|
||||
将示例版本替换为根锁文件中的标签,并使用没有同名发行压缩包的输出目录。脚本检查源码与产物的校验值,打包主题、预览、文档、官方许可证和来源信息,排除残留的旧主题构建。
|
||||
|
||||
@@ -126,11 +126,11 @@ cd ..
|
||||
|
||||
## 兼容性
|
||||
|
||||
- **最新测试:** Gitea 28.2.0
|
||||
- **源码构建基线:** Gitea 28.2.0
|
||||
- **最新测试:** Gitea 28.3.0
|
||||
- **源码构建基线:** Gitea 28.3.0
|
||||
- **最新发布版:** [v28.1.0](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/latest)
|
||||
|
||||
Gitea 28.2.0 未引入邮件模板接口变更,已发布的 v28.1.0 模板仍兼容;源码构建使用锁定的 v28.2.0 官方输入,详见[兼容性记录](COMPATIBILITY.zh-CN.md)。
|
||||
Gitea 28.3.0 未引入邮件模板接口变更,已发布的 v28.1.0 模板仍兼容;源码构建使用锁定的 v28.3.0 官方输入,详见[兼容性记录](COMPATIBILITY.zh-CN.md)。
|
||||
|
||||
## 项目目录结构
|
||||
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"repository": "https://github.com/go-gitea/gitea",
|
||||
"tag": "v28.2.0",
|
||||
"commit": "829b49c1ae96015e345f9d2a0eb1ea7acd5f31e1",
|
||||
"tag": "v28.3.0",
|
||||
"commit": "4f5a3e13e5f3aca85d830e3a9024c893b0bbf1e1",
|
||||
"files": {
|
||||
"LICENSE": "ed2f10a9d78b8c6c9ef33f1420d0eb266981891caf2f15d630553f02dc60d3ae",
|
||||
"modules/templates/mail.go": "fb8204b79f700f88c7c3f0da16e50c3d678a2216e62e98f712805ed1d42ab3a9",
|
||||
@@ -12,7 +12,7 @@
|
||||
"options/locale/locale_cs-CZ.json": "816c4a0cfc6112c8cc9a63e63b3de0bc623819a23d2f2bbb800b09c45d23da66",
|
||||
"options/locale/locale_de-DE.json": "593ec4e3652c0faf9ecb5d5b27a649c1c0a933030ecdfbf4dc810ea4ad69bfb8",
|
||||
"options/locale/locale_el-GR.json": "dd03e6e083d6286d8eb2045a37bcf5c578fc339ab87a72a7397e01733078d89e",
|
||||
"options/locale/locale_en-US.json": "0821c7e631d62e8d80a49a119ba0fb4430f27e4da37a3c943b3cd0faee43e163",
|
||||
"options/locale/locale_en-US.json": "ae6566c5c5e3fbe370363d525c1a51f09054c726d5da72bda4bf5394c7873061",
|
||||
"options/locale/locale_es-ES.json": "cbb1cd7bc4709a189b8b189d26a83a06fed0c32e0b5ac5602370fb0f03a39d04",
|
||||
"options/locale/locale_fa-IR.json": "ad85f5829335844883608ed5ed09dee5bc5f4800cda7ef9277200aa4a7f35f32",
|
||||
"options/locale/locale_fi-FI.json": "3b811b0ee794548399bcb64a887711a26cc0c26e04dfd0305b0846742d065952",
|
||||
@@ -39,7 +39,7 @@
|
||||
"options/locale/locale_zh-TW.json": "9d242d16492e808889d7cdcc5db2ee5e53baabfc3d3dc13ea854c8852e963ec4",
|
||||
"public/assets/img/favicon.png": "cbe472b55c0b2f2e57db58e991fc457e136fbaf246f54aaf7631ff089c76344f",
|
||||
"templates/mail/base/footer.tmpl": "5accf2a39dffd952fd2d55a4fa867d33d91415792f11f90bc7e2fc8f8492117b",
|
||||
"templates/mail/base/head.tmpl": "239a2f805949ca7ebd27fa11a34a20bbb7a5d435a95f3c25c55a4139126d7476",
|
||||
"templates/mail/base/head.tmpl": "40d885a4c2747aef22e3462c1ad07e5bea2b6b629bf07ccf59b0abf28bf35f97",
|
||||
"templates/mail/org/team_invite.tmpl": "646133e75c9efdce96eb7d58d8aea0111cae890c816a718ee8098346ab089a44",
|
||||
"templates/mail/repo/actions/workflow_run.tmpl": "dbd34f3c7fb4f10a7497ca2872a648104c098f425866cae50f44b98033000b45",
|
||||
"templates/mail/repo/collaborator.tmpl": "dd8a858a4fcdb37c71c88b9e51f7f5bbfa3c6afec572e2c9c7801fde4ececfb5",
|
||||
|
||||
@@ -12,7 +12,7 @@ func TestSnapshotAndKeys(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if s.Lock.Tag != "v28.2.0" || len(s.Templates) != 13 || len(s.Locales) != 28 {
|
||||
if s.Lock.Tag != "v28.3.0" || len(s.Templates) != 13 || len(s.Locales) != 28 {
|
||||
t.Fatalf("unexpected baseline %s", s.Lock.Tag)
|
||||
}
|
||||
keys, err := ReferencedKeys(s)
|
||||
@@ -32,7 +32,7 @@ func TestSnapshotAndKeys(t *testing.T) {
|
||||
if ValidateKeys(s) == nil {
|
||||
t.Fatal("missing English key accepted")
|
||||
}
|
||||
if !validTag("v28.0.0") || !validTag("v28.2.0") || validTag("v1.27.3") || validTag("v28.2.0-rc1") {
|
||||
if !validTag("v28.0.0") || !validTag("v28.3.0") || validTag("v1.27.3") || validTag("v28.3.0-rc1") {
|
||||
t.Fatal("tag policy")
|
||||
}
|
||||
for _, p := range []string{"../x", "/x", "C:/x", "mail\\x"} {
|
||||
|
||||
Reference in new issue
Block a user