CONTRIBUTING*: polish Chinese wording and refine AI policy
Improve Simplified and Traditional Chinese phrasing for readability, unify Pull Request capitalization in the Chinese guides and consolidate the forbidden automated AI usage rules across all three languages. Assisted-by: Antigravity:gemini Signed-off-by: Locez <locez@locez.com>
This commit is contained in:
1 parent
0eb73fc29b
commit
b22a87eecc
3 files changed
+49
-52
No files matched your search
+3
-4
@@ -171,10 +171,9 @@ Disclosure is not required for:
|
||||
|
||||
### Forbidden usage
|
||||
|
||||
- Pull requests, pushes or comments published by a tool before the contributor
|
||||
has reviewed and approved each one.
|
||||
- Opening pull requests in bulk from a tool's output without building and
|
||||
testing each one.
|
||||
- Having an automated tool directly open pull requests or post comments before
|
||||
a human contributor has confirmed a successful build, verified that the tests
|
||||
pass and reviewed each piece of tool-generated content.
|
||||
- Hiding or understating the extent of AI involvement.
|
||||
|
||||
This repository's own bots, such as autobump and nvchecker, are not covered by
|
||||
|
||||
+24
-25
@@ -9,7 +9,7 @@
|
||||
gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 仓库),依赖 `::gentoo`(`metadata/layout.conf` 中 `masters = gentoo`)。
|
||||
|
||||
> [!NOTE]
|
||||
> 故意绕过本文规定者将被移出组织,其维护的全部软件包将被 treeclean。此规则适用于全部维护者,包括 owner 和 member。
|
||||
> 蓄意规避本文规定者将被移出组织,其维护的所有软件包也将被 treeclean。此规则适用于所有维护者,包括 owner 和 member。
|
||||
|
||||
## 软件包
|
||||
|
||||
@@ -17,11 +17,11 @@ gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 仓库),依赖 `::gentoo
|
||||
- `::gentoo` 已有的依赖不在本仓库重复添加;除特殊情况外,不添加与 `::gentoo` 同名的软件包;
|
||||
- 每个软件包须有 `metadata.xml`,并写明维护者;
|
||||
- `LICENSE` 须与所打包软件声明的许可证一致,`::gentoo` 没有的许可证须加入 `licenses/` 和 `profiles/license_groups`;
|
||||
- 除特殊情况外,同一软件包的改动须在同一个提交中;
|
||||
- 软件包须登记到 `.github/workflows/overlay.toml`,依 `category/package` 的字母顺序插入,不适合 nvchecker 的须注释原因;
|
||||
- 除特殊情况外,同一软件包的改动须放在同一个提交中;
|
||||
- 软件包须登记到 `.github/workflows/overlay.toml`,按 `category/package` 的字母顺序插入,无法由 nvchecker 追踪的,需以注释说明原因;
|
||||
- 可自动更新版本的软件包见 [scripts/autobump.zh.md](./scripts/autobump.zh.md);
|
||||
- ebuild 提交前须进行测试;
|
||||
- 不再维护的软件包,须在 issue 中寻找接手者。无人接手的,依据 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 顶部加入条目,写明作者、邮箱、日期(UTC)、原因和移除日期,至少 30 天后移除。范例:
|
||||
- 不再维护的软件包,须先发 issue 寻找接手者。无人接手的,依据 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 顶部加入条目,写明作者、邮箱、日期(UTC)、原因和移除日期,至少 30 天后移除。示例:
|
||||
|
||||
```
|
||||
# Zakk <zakk@gentoozh.org> (2026-11-18)
|
||||
@@ -39,17 +39,17 @@ gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 仓库),依赖 `::gentoo
|
||||
|
||||
## 提交
|
||||
|
||||
所有改动经 pull request 合并,禁止直接推送 master 或绕过 CI。
|
||||
所有改动经 Pull Request 合并,禁止直接推送到 master 或绕过 CI。
|
||||
|
||||
提交遵循 [Gentoo git workflow](https://wiki.gentoo.org/wiki/Gentoo_git_workflow):
|
||||
|
||||
- 第一行为摘要行,格式为 `category/package: 摘要`,不超过 69 个字符;
|
||||
- 首行为摘要,格式为 `category/package: 摘要`,不超过 69 个字符;
|
||||
- 正文可选;如有正文,须与摘要行之间空一行;
|
||||
- 须附 `Signed-off-by:`,可用 `pkgdev commit --signoff` 添加;
|
||||
- 版本更新的格式为 `category/package: add 0.5, drop 0.4`;
|
||||
- pull request 中不得有 merge commit,同步 master 时使用 `git rebase`,不使用 `git merge`。
|
||||
- Pull Request 中不得有 merge commit,同步 master 时使用 `git rebase`,不使用 `git merge`。
|
||||
|
||||
范例:
|
||||
示例:
|
||||
|
||||
```
|
||||
app-misc/foo: fix build with GCC 16
|
||||
@@ -67,21 +67,21 @@ pkgcheck scan --net # 检查当前改动
|
||||
pkgdev commit --signoff # 提交,生成摘要行并附 Signed-off-by
|
||||
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include."
|
||||
# 自定义摘要行和正文
|
||||
pkgcheck scan --commits --net # 发起 pull request 前检查本分支的提交
|
||||
pkgcheck scan --commits --net # 发起 Pull Request 前检查本分支的提交
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> `pkgdev commit` 的 `-b` 和 `-c` 会引用到 bugs.gentoo.org,不要用于本仓库的 issue。
|
||||
> `pkgdev commit` 的 `-b` 和 `-c` 会关联到 bugs.gentoo.org,不要用于本仓库的 issue。
|
||||
|
||||
### pull request 描述
|
||||
### Pull Request 描述
|
||||
|
||||
须使用 pull request 模板:
|
||||
需按 Pull Request 模板填写:
|
||||
|
||||
- 描述写在 `<!-- Please put the pull request description above -->` 之上;
|
||||
- 描述写在 `<!-- Please put the pull request description above -->` 上方;
|
||||
- 关闭本仓库的 issue 时,在描述中加入 `Closes #N`;
|
||||
- 改动了软件包、`eclass/`、`profiles/` 或 `licenses/` 时,须勾选 pkgcheck;如果使用了 AI,须勾选 AI。
|
||||
- 改动了软件包、`eclass/`、`profiles/` 或 `licenses/` 时,须勾选 pkgcheck 对应项;如果使用了 AI,须勾选 AI 声明项。
|
||||
|
||||
范例:
|
||||
示例:
|
||||
|
||||
```
|
||||
Because upstream 1.2.3 fixes a crash on Wayland, add it.
|
||||
@@ -101,7 +101,7 @@ Please note that all boxes must be checked for the pull request to be merged.
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> 发起 pull request 后,须修复 pkgcheck 报告和 CI 发现的问题,包括 QA 提示。
|
||||
> 发起 Pull Request 后,须修复 pkgcheck 和 CI 报告的问题,包括 QA 警告。
|
||||
|
||||
## AI 政策
|
||||
|
||||
@@ -111,11 +111,11 @@ Please note that all boxes must be checked for the pull request to be merged.
|
||||
- 贡献者须理解 AI 生成的内容;
|
||||
- `Signed-off-by` 须由贡献者本人添加,不得由工具添加;
|
||||
- 添加 `Signed-off-by` 前,贡献者须确认 AI 生成的部分没有复制许可证不兼容的代码;
|
||||
- AI 生成的提交信息和 pull request 描述须准确、精简、不重复,所述内容须经验证。
|
||||
- AI 生成的提交信息和 Pull Request 描述须准确、精简、无冗余,且所写内容须经核实。
|
||||
|
||||
### 声明
|
||||
|
||||
含 AI 生成改动的提交,须在 `Signed-off-by:` 之上添加 `Assisted-by:` 行,格式同 [Linux 内核](https://docs.kernel.org/process/coding-assistants.html),为 `Assisted-by: 工具名:模型名`。用 `pkgdev commit -T` 添加:
|
||||
包含 AI 生成内容的提交,须在 `Signed-off-by:` 上方添加 `Assisted-by:` 行,格式遵循 [Linux 内核](https://docs.kernel.org/process/coding-assistants.html) 规范: `Assisted-by: 工具名:模型名`。用 `pkgdev commit -T` 添加:
|
||||
|
||||
```
|
||||
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include." -T Assisted-by:Claude:claude-opus-5-5
|
||||
@@ -133,30 +133,29 @@ Signed-off-by: A Developer <example@gentoo.org>
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> 不得使用 `Co-authored-by:`,CI 将拒绝。
|
||||
> 不得使用 `Co-authored-by:`,否则 CI 会拒绝该提交。
|
||||
|
||||
以下情况无需声明:
|
||||
|
||||
- 小改动或机械性改动;
|
||||
- 仅使用 AI 审查贡献者自己的改动,并由贡献者自行修复 AI 发现的问题。
|
||||
- 仅使用 AI 审查自己的改动,并自行修复 AI 发现的问题。
|
||||
|
||||
### 禁止
|
||||
|
||||
- 由工具发出 pull request、推送或评论,而贡献者未逐条阅读并批准。
|
||||
- 根据工具输出批量发起 pull request,而未逐个构建和测试。
|
||||
- 在人类贡献者没有确认构建成功、通过测试和逐条审阅自动化工具生成的内容时,由自动化工具直接发起 Pull Request 或发表评论。
|
||||
- 隐瞒或淡化 AI 的参与程度。
|
||||
|
||||
autobump、nvchecker 等本仓库自有的 bot 不受上述规则限制。
|
||||
|
||||
### 测试
|
||||
|
||||
AI 生成的改动与其他改动适用相同的测试要求,ebuild 须经过冒烟测试。不得声称执行了实际未执行的测试。
|
||||
AI 生成的改动与其他改动适用相同的测试要求,ebuild 须经过冒烟测试。不得虚报未实际进行的测试。
|
||||
|
||||
### 执行
|
||||
|
||||
如果怀疑贡献中使用了 AI 却未声明,我们会要求说明,贡献者须如实回答;拒绝说明的,我们会关闭该 pull request 或 issue。本规则同样适用于维护者。
|
||||
如果怀疑贡献中使用了 AI 却未声明,我们会要求说明,贡献者须如实回答;拒绝说明的,我们会关闭该 Pull Request 或 issue。本规则同样适用于维护者。
|
||||
|
||||
agent 可以使用 [gentoo-zh/skills](https://github.com/gentoo-zh/skills) 打包、更新版本和审查。它只执行 AGENTS.md 的规则,不另立规则。安装命令:
|
||||
AI agent 可使用 [gentoo-zh/skills](https://github.com/gentoo-zh/skills) 进行打包、更新版本和代码审查。该工具集仅落实 AGENTS.md 的规范,不额外增设规则。安装命令:
|
||||
|
||||
```
|
||||
npx skills add gentoo-zh/skills -g
|
||||
|
||||
+22
-23
@@ -9,7 +9,7 @@
|
||||
gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 儲存庫),依賴 `::gentoo`(`metadata/layout.conf` 中 `masters = gentoo`)。
|
||||
|
||||
> [!NOTE]
|
||||
> 故意繞過本文規定者將被移出組織,其維護的全部套件將被 treeclean。此規則適用於全部維護者,包括 owner 和 member。
|
||||
> 蓄意規避本文規定者將被移出組織,其維護的所有套件也將被 treeclean。此規則適用於所有維護者,包括 owner 和 member。
|
||||
|
||||
## 套件
|
||||
|
||||
@@ -17,11 +17,11 @@ gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 儲存庫),依賴 `::gen
|
||||
- `::gentoo` 已有的相依套件不在本儲存庫重複新增;除特殊情況外,不新增與 `::gentoo` 同名的套件;
|
||||
- 每個套件須有 `metadata.xml`,並寫明維護者;
|
||||
- `LICENSE` 須與所打包軟體聲明的授權條款一致,`::gentoo` 沒有的授權條款須加入 `licenses/` 和 `profiles/license_groups`;
|
||||
- 除特殊情況外,同一套件的改動須在同一個提交中;
|
||||
- 套件須登記到 `.github/workflows/overlay.toml`,依 `category/package` 的字母順序插入,不適合 nvchecker 的須註解原因;
|
||||
- 除特殊情況外,同一套件的改動須放在同一個提交中;
|
||||
- 套件須登記到 `.github/workflows/overlay.toml`,依 `category/package` 的字母順序插入,無法由 nvchecker 追蹤的,需以註解說明原因;
|
||||
- 可自動更新版本的套件見 [scripts/autobump.zh.md](./scripts/autobump.zh.md);
|
||||
- ebuild 提交前須進行測試;
|
||||
- 不再維護的套件,須在 issue 中尋找接手者。無人接手的,依據 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 最上方加入條目,寫明作者、電子郵件、日期(UTC)、原因和移除日期,至少 30 天後移除。範例:
|
||||
- 不再維護的套件,須先發 issue 尋找接手者。無人接手的,依據 [last rites](https://devmanual.gentoo.org/ebuild-maintenance/removal/) 流程移除:在 `profiles/package.mask` 最上方加入條目,寫明作者、電子郵件、日期(UTC)、原因和移除日期,至少 30 天後移除。範例:
|
||||
|
||||
```
|
||||
# Zakk <zakk@gentoozh.org> (2026-11-18)
|
||||
@@ -39,15 +39,15 @@ gentoo-zh 是 Gentoo 的 overlay(第三方 ebuild 儲存庫),依賴 `::gen
|
||||
|
||||
## 提交
|
||||
|
||||
所有改動經 pull request 合併,禁止直接推送 master 或繞過 CI。
|
||||
所有改動經 Pull Request 合併,禁止直接推送到 master 或繞過 CI。
|
||||
|
||||
提交遵循 [Gentoo git workflow](https://wiki.gentoo.org/wiki/Gentoo_git_workflow):
|
||||
|
||||
- 第一行為摘要行,格式為 `category/package: 摘要`,不超過 69 個字元;
|
||||
- 首行為摘要,格式為 `category/package: 摘要`,不超過 69 個字元;
|
||||
- 內文可選;如有內文,須與摘要行之間空一行;
|
||||
- 須附 `Signed-off-by:`,可用 `pkgdev commit --signoff` 新增;
|
||||
- 版本更新的格式為 `category/package: add 0.5, drop 0.4`;
|
||||
- pull request 中不得有 merge commit,同步 master 時使用 `git rebase`,不使用 `git merge`。
|
||||
- Pull Request 中不得有 merge commit,同步 master 時使用 `git rebase`,不使用 `git merge`。
|
||||
|
||||
範例:
|
||||
|
||||
@@ -67,19 +67,19 @@ pkgcheck scan --net # 檢查目前的改動
|
||||
pkgdev commit --signoff # 提交,產生摘要行並附 Signed-off-by
|
||||
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include."
|
||||
# 自訂摘要行和內文
|
||||
pkgcheck scan --commits --net # 發起 pull request 前檢查本分支的提交
|
||||
pkgcheck scan --commits --net # 發起 Pull Request 前檢查本分支的提交
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> `pkgdev commit` 的 `-b` 和 `-c` 會引用到 bugs.gentoo.org,不要用於本儲存庫的 issue。
|
||||
> `pkgdev commit` 的 `-b` 和 `-c` 會關聯到 bugs.gentoo.org,不要用於本儲存庫的 issue。
|
||||
|
||||
### pull request 描述
|
||||
### Pull Request 描述
|
||||
|
||||
須使用 pull request 範本:
|
||||
需按 Pull Request 範本填寫:
|
||||
|
||||
- 描述寫在 `<!-- Please put the pull request description above -->` 之上;
|
||||
- 描述寫在 `<!-- Please put the pull request description above -->` 上方;
|
||||
- 關閉本儲存庫的 issue 時,在描述中加入 `Closes #N`;
|
||||
- 改動了套件、`eclass/`、`profiles/` 或 `licenses/` 時,須勾選 pkgcheck;如果使用了 AI,須勾選 AI。
|
||||
- 改動了套件、`eclass/`、`profiles/` 或 `licenses/` 時,須勾選 pkgcheck 對應項目;如果使用了 AI,須勾選 AI 聲明項目。
|
||||
|
||||
範例:
|
||||
|
||||
@@ -101,7 +101,7 @@ Please note that all boxes must be checked for the pull request to be merged.
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> 發起 pull request 後,須修復 pkgcheck 報告和 CI 發現的問題,包括 QA 提示。
|
||||
> 發起 Pull Request 後,須修復 pkgcheck 和 CI 回報的問題,包括 QA 警告。
|
||||
|
||||
## AI 政策
|
||||
|
||||
@@ -111,11 +111,11 @@ Please note that all boxes must be checked for the pull request to be merged.
|
||||
- 貢獻者須理解 AI 生成的內容;
|
||||
- `Signed-off-by` 須由貢獻者本人新增,不得由工具新增;
|
||||
- 新增 `Signed-off-by` 前,貢獻者須確認 AI 生成的部分沒有複製授權條款不相容的程式碼;
|
||||
- AI 生成的提交訊息和 pull request 描述須準確、精簡、不重複,所述內容須經驗證。
|
||||
- AI 生成的提交訊息和 Pull Request 描述須準確、精簡、無冗餘,且所寫內容須經核實。
|
||||
|
||||
### 聲明
|
||||
|
||||
含 AI 生成改動的提交,須在 `Signed-off-by:` 之上新增 `Assisted-by:` 行,格式同 [Linux 核心](https://docs.kernel.org/process/coding-assistants.html),為 `Assisted-by: 工具名:模型名`。用 `pkgdev commit -T` 新增:
|
||||
包含 AI 生成內容的提交,須在 `Signed-off-by:` 上方新增 `Assisted-by:` 行,格式遵循 [Linux 核心](https://docs.kernel.org/process/coding-assistants.html) 規範: `Assisted-by: 工具名:模型名`。用 `pkgdev commit -T` 新增:
|
||||
|
||||
```
|
||||
pkgdev commit --signoff -m "fix build with GCC 16" -m "Add a missing include." -T Assisted-by:Claude:claude-opus-5-5
|
||||
@@ -133,30 +133,29 @@ Signed-off-by: A Developer <example@gentoo.org>
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> 不得使用 `Co-authored-by:`,CI 將拒絕。
|
||||
> 不得使用 `Co-authored-by:`,否則 CI 會拒絕該提交。
|
||||
|
||||
以下情況無需聲明:
|
||||
|
||||
- 小改動或機械性改動;
|
||||
- 僅使用 AI 審查貢獻者自己的改動,並由貢獻者自行修復 AI 發現的問題。
|
||||
- 僅使用 AI 審查自己的改動,並自行修復 AI 發現的問題。
|
||||
|
||||
### 禁止
|
||||
|
||||
- 由工具發出 pull request、推送或留言,而貢獻者未逐條閱讀並批准。
|
||||
- 根據工具輸出批次發起 pull request,而未逐一建置和測試。
|
||||
- 在人類貢獻者沒有確認建置成功、通過測試和逐條審閱自動化工具產生的內容時,由自動化工具直接發起 Pull Request 或發表留言。
|
||||
- 隱瞞或淡化 AI 的參與程度。
|
||||
|
||||
autobump、nvchecker 等本儲存庫自有的 bot 不受上述規則限制。
|
||||
|
||||
### 測試
|
||||
|
||||
AI 生成的改動與其他改動適用相同的測試要求,ebuild 須經過冒煙測試。不得聲稱執行了實際未執行的測試。
|
||||
AI 生成的改動與其他改動適用相同的測試要求,ebuild 須經過冒煙測試。不得虛報未實際進行的測試。
|
||||
|
||||
### 執行
|
||||
|
||||
如果懷疑貢獻中使用了 AI 卻未聲明,我們會要求說明,貢獻者須如實回答;拒絕說明的,我們會關閉該 pull request 或 issue。本規則同樣適用於維護者。
|
||||
如果懷疑貢獻中使用了 AI 卻未聲明,我們會要求說明,貢獻者須如實回答;拒絕說明的,我們會關閉該 Pull Request 或 issue。本規則同樣適用於維護者。
|
||||
|
||||
agent 可以使用 [gentoo-zh/skills](https://github.com/gentoo-zh/skills) 打包、更新版本和審查。它只執行 AGENTS.md 的規則,不另立規則。安裝指令:
|
||||
AI agent 可使用 [gentoo-zh/skills](https://github.com/gentoo-zh/skills) 進行打包、更新版本和程式碼審查。該工具集僅落實 AGENTS.md 的規範,不額外增設規則。安裝指令:
|
||||
|
||||
```
|
||||
npx skills add gentoo-zh/skills -g
|
||||
|
||||
Reference in new issue
Block a user