[moz] fix(handler): ToolchainApiSection 补充 Gitea Review API curl 指引
根因:姜维在 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:
@@ -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):",
|
||||
|
||||
Reference in New Issue
Block a user