chore: sync Gitea 28.2.0 inputs and compatibility docs
Validate / Validate (push) Successful in 7m58s

This commit is contained in:
KenanZhu committed 2026-10-21 17:16:36 +08:00
1 parent d99c5d1dc5
commit 85ee9dbdbf
8 files changed
+29 -15

No files matched your search

+5
View File
@@ -13,6 +13,7 @@ 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** | [PASS] | Mail templates, template function registrations and mail translation keys are unchanged from 28.1.0 |
| 28.1.0 | **v28.1.0** | [PASS] | - |
| 28.0.0 | **v28.1.0** | [PASS] | Gitea replaced the mail function `FileSize` with `FormatByteSize` |
| 1.27.3 | **v1.27.3** | [PASS] | Pull request push notification commit links fixed in every theme |
@@ -36,6 +37,7 @@ 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.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 |
@@ -54,6 +56,9 @@ This table describes changes in **Gitea**, not fixes in this template repository
## 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
View File
@@ -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.1.0`:
Use `sync` only when reviewing a new official version. For example, to explicitly synchronize to `v28.2.0`:
```bash
go run . upstream sync --tag v28.1.0
go run . upstream sync --tag v28.2.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.1.0 --output build/release-review
python .github/scripts/package_release.py --version v28.2.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.
+4 -2
View File
@@ -126,9 +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.1.0
- **Latest tested:** Gitea 28.2.0
- **Source build baseline:** Gitea 28.2.0
- **Latest release:** [v28.1.0](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/latest)
- **Upstream Gitea 28.1.0:** [PASS]
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).
## Project Directory Structure
+5
View File
@@ -13,6 +13,7 @@
| Gitea 版本 | 推荐模板版本 | 状态 | 说明 |
|---|---|---|---|
| 28.2.0 | **v28.1.0** | [PASS] | 邮件模板、模板函数注册及邮件翻译键与 28.1.0 一致 |
| 28.1.0 | **v28.1.0** | [PASS] | - |
| 28.0.0 | **v28.1.0** | [PASS] | Gitea 将邮件函数 `FileSize` 替换为 `FormatByteSize` |
| 1.27.3 | **v1.27.3** | [PASS] | 全部主题已修复拉取请求推送通知的提交链接 |
@@ -36,6 +37,7 @@
| Gitea | 发布日期 | 邮件模板变化 | 影响 |
|---|---|---|---|
| **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 无法直接使用新版本邮件模板 |
@@ -54,6 +56,9 @@
## 模板变量参考
> [!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](#注释)。
## 翻译键
+3 -3
View File
@@ -69,10 +69,10 @@ go run . upstream verify --root "C:\Projects\GiteaMailTemplates"
#### 更新官方版本
只有需要评审新的官方版本时才使用 `sync`。例如,明确同步到 `v28.1.0`:
只有需要评审新的官方版本时才使用 `sync`。例如,明确同步到 `v28.2.0`:
```bash
go run . upstream sync --tag v28.1.0
go run . upstream sync --tag v28.2.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.1.0 --output build/release-review
python .github/scripts/package_release.py --version v28.2.0 --output build/release-review
```
将示例版本替换为根锁文件中的标签,并使用没有同名发行压缩包的输出目录。脚本检查源码与产物的校验值,打包主题、预览、文档、官方许可证和来源信息,排除残留的旧主题构建。
+4 -2
View File
@@ -126,9 +126,11 @@ cd ..
## 兼容性
- **最新测试:** Gitea 28.1.0
- **最新测试:** Gitea 28.2.0
- **源码构建基线:** Gitea 28.2.0
- **最新发布版:** [v28.1.0](https://gitea.kenanzhu.com/KenanZhu/GiteaMailTemplates/releases/latest)
- **上游 Gitea 28.1.0:** [PENDING]
Gitea 28.2.0 未引入邮件模板接口变更,已发布的 v28.1.0 模板仍兼容;源码构建使用锁定的 v28.2.0 官方输入,详见[兼容性记录](COMPATIBILITY.zh-CN.md)。
## 项目目录结构
+3 -3
View File
@@ -1,8 +1,8 @@
{
"schema": 1,
"repository": "https://github.com/go-gitea/gitea",
"tag": "v28.1.0",
"commit": "4ebd5e319b6a9e629bfd7a04292a6fe85b08dee9",
"tag": "v28.2.0",
"commit": "829b49c1ae96015e345f9d2a0eb1ea7acd5f31e1",
"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": "3505b23a6285140eb4ff97f7b24846963254013403791189e468967b5c870c95",
"options/locale/locale_en-US.json": "0821c7e631d62e8d80a49a119ba0fb4430f27e4da37a3c943b3cd0faee43e163",
"options/locale/locale_es-ES.json": "cbb1cd7bc4709a189b8b189d26a83a06fed0c32e0b5ac5602370fb0f03a39d04",
"options/locale/locale_fa-IR.json": "ad85f5829335844883608ed5ed09dee5bc5f4800cda7ef9277200aa4a7f35f32",
"options/locale/locale_fi-FI.json": "3b811b0ee794548399bcb64a887711a26cc0c26e04dfd0305b0846742d065952",
+2 -2
View File
@@ -12,7 +12,7 @@ func TestSnapshotAndKeys(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if s.Lock.Tag != "v28.1.0" || len(s.Templates) != 13 || len(s.Locales) != 28 {
if s.Lock.Tag != "v28.2.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("v1.27.3") || validTag("v28.1.0-rc1") {
if !validTag("v28.0.0") || !validTag("v28.2.0") || validTag("v1.27.3") || validTag("v28.2.0-rc1") {
t.Fatal("tag policy")
}
for _, p := range []string{"../x", "/x", "C:/x", "mail\\x"} {