[moz] impl(§17): CI/部署失败 steps 分支指引 + 基础设施 Issue 转交流程
CI / lint (pull_request) Successful in 10s
CI / test (pull_request) Successful in 27s
CI / frontend (pull_request) Successful in 13s
CI / notify-on-failure (pull_request) Successful in 0s

改动 1: ci_failure steps 增加分支指引(代码问题自己修/基础设施问题提Issue给姜维)
改动 2: deploy_failure steps 同上分支指引(2处定义都改)
改动 3: issue_assigned handler 按 type/infrastructure label 分流
  - infrastructure label → infrastructure_failure event_type(运维排查 steps)
  - 其他 → 原有编码 steps
改动 4: ToolchainApiSection 新增「需要创建 Issue 时」API 指引段落
改动 5: Red Flags 新增「不是我代码的问题」条目
测试: 8 个新测试,463 passed
This commit is contained in:
cfdaily
2026-06-19 13:18:11 +08:00
parent 67b504c5db
commit f74ae30d41
3 changed files with 141 additions and 32 deletions
+14
View File
@@ -166,6 +166,19 @@ class ToolchainApiSection:
"",
"⚠️ 不要使用 Mail API(飞鸽传书)。所有协作通过 Gitea 留痕。",
"",
"### 需要创建 Issue 时",
"",
"如果步骤中要求创建 Issue 指派他人(如 jiangwei-infra):",
"```bash",
f'curl -s -X POST "{_GITEA_BASE}/repos/{{repo}}/issues" \\',
' -H "Authorization: token <your-token>" \\',
' -H "Content-Type: application/json" \\',
' -d \'{"title": "[moz] infra: 简述问题", "body": "## 问题描述\\n\\n<简要描述问题现象>\\n\\n## 错误来源\\n\\n- 仓库: <repo>\\n- PR/Commit: <链接>\\n- CI/Deploy run: <Gitea Actions 页面链接>\\n\\n## 日志关键片段\\n\\n```<错误日志摘要>```\\n\\n## 判断依据\\n\\n<为什么判断为基础设施问题>", "assignees": ["jiangwei-infra"], "labels": [<label_id>]}\'',
"```",
"",
"⚠️ Issue body 必须包含错误来源链接(PR/Commit + CI run),让排查者能直接看到全貌。",
"⚠️ label 数字 ID 先 GET /repos/{repo}/labels 查询 type/infrastructure 对应的 ID。",
"",
]
return "\n".join(lines)
@@ -218,6 +231,7 @@ class ToolchainConstraintsSection:
'| “我已经知道了” | ❌ 知道不等于执行。执行步骤 + 提交 action report 才算完成 |',
'| “步骤太多了,选几个做就行” | ❌ 错!必须逐条执行,不可跳过 |',
'| “这个步骤不适用于当前情况” | ❌ 如果确实不适用,在 action report 中说明原因,但其他步骤必须执行 |',
'| “CI/部署失败不是我代码的问题,我什么也不用做” | ❌ 错!即使是基础设施问题,你也必须创建 Issue 指派 jiangwei-infrabody 含错误来源链接 + 日志 + 判断依据),并在 action report 中说明。不能只报告“不是我的问题”就完事 |',
"",
]
return "\n".join(lines)