auto-sync: 2026-06-07 11:35:15
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions

This commit is contained in:
cfdaily
2026-06-07 11:35:15 +08:00
parent 543decca99
commit 3ffea4a45d
+13 -8
View File
@@ -1875,7 +1875,10 @@ def calc_risk_level(files: list[str]) -> str:
...
def get_changed_files(pr: dict) -> list[str]:
"""从 PR payload 提取改动文件列表"""
"""从 PR payload 提取改动文件列表
payload 只有 changed_files 数量,需要额外调用 Gitea API:
GET /repos/{owner}/{repo}/pulls/{number}/files
"""
...
```
@@ -1981,13 +1984,15 @@ CI workflow 失败时写 PR comment,触发 issue_comment Webhook
### §16.8. 待确认项
| # | 项 | 负责人 | 说明 |
|---|------|--------|------|
| 1 | ~~各 Agent Gitea 上的注册用户名是否和 Agent ID 一致~~ | ~~姜维~~ | **已确认不一致**zhangfei ≠ zhangfei-dev),已使用映射表 |
| 2 | Gitea Webhook 是否已配置 secret | 姜维 | 当前已配未启用 |
| 3 | CI workflow 是否已有写 PR comment 的 step | — | 当前 CI workflow 可能没有 |
| 4 | `from=system` HTTP API 还是只走内部函数 | — | mail_routes.py 当前只在内部函数支持 system |
| 5 | PR changed_files 是否包含在 Webhook payload 中 | — | Gitea v1.23.4 可能需要额外 API 调用 |
| # | 项 | 状态 | 结论 |
|---|------|------|------|
| 1 | Agent Gitea 用户名映射 | ✅ 已确认 | 不一致zhangfei ≠ zhangfei-dev),已内建映射表 |
| 2 | Gitea Webhook secret | 姜维确认 | 签名算法已确认为 HMAC-SHA256 |
| 3 | CI workflow PR comment | ✅ 已有 | ci.yml 已有 notify-on-failure job 写 PR comment,格式为 `❌ **CI 失败**...`,需改为 `[CI]` 前缀 |
| 4 | `from=system`内部函数 | ✅ 已确定 | 走内部函数(和 mail_notify.py 一致),不走 HTTP API |
| 5 | PR changed_files | ✅ 已确认 | payload 只有 changed_files 数量,文件列表需额外调用 `GET /repos/{owner}/{repo}/pulls/{number}/files` |
| 6 | Deploy workflow 通知方式 | ✅ 已确认 | 当前创建 Issue(非 PR comment)。部署通知走 `issues` Webhookissue created)而非 `issue_comment` |
| 7 | 签名算法 | ✅ 已确认 | Gitea 使用 HMAC-SHA256,代码注释已补 |
---