[moz] fix(handler): ToolchainApiSection 补充 Gitea Review API curl 指引
CI / lint (pull_request) Successful in 23s
CI / test (pull_request) Successful in 39s
CI / frontend (pull_request) Successful in 23s
CI / notify-on-failure (pull_request) Successful in 0s

根因:姜维在 PR comment 中写 Review 而非通过 Review API 提交。
原因:steps 写了'提交 Review(Gitea API: POST .../reviews)'但
ToolchainApiSection 中没有 Review API 的 curl 示例。agent 找不到
怎么提交,就用最接近的 comment API 写 Review。

修复:在 ToolchainApiSection 中增加'提交 PR Review'段落,
含完整 curl 示例 + event 参数说明 + ⚠️ 必须用 Review API 提交。
This commit is contained in:
cfdaily
2026-06-20 19:26:18 +08:00
parent 2e2edd2b00
commit 735b8c4fed
+13
View File
@@ -166,6 +166,19 @@ class ToolchainApiSection:
"",
"⚠️ 不要使用 Mail API(飞鸽传书)。所有协作通过 Gitea 留痕。",
"",
"### 提交 PR Review",
"",
"如果步骤中要求提交 Review(审查 PR):",
"```bash",
f'curl -s -X POST "{_GITEA_BASE}/repos/{{repo}}/pulls/{{pr_number}}/reviews" \\',
' -H "Authorization: token <your-token>" \\',
' -H "Content-Type: application/json" \\',
' -d \'{"event": "approved", "body": "审查结论"}\'',
"```",
"",
"event 可选:approved(通过)/ request_changes(驳回)",
"⚠️ 必须用 Review API 提交,不要在 PR comment 中写 Review。",
"",
"### 需要创建 Issue 时",
"",
"如果步骤中要求创建 Issue 指派他人(如 jiangwei-infra):",