From 182a452f419afba47247afe467dde6978857f830 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sun, 7 Jun 2026 11:55:55 +0800 Subject: [PATCH] auto-sync: 2026-06-07 11:55:55 --- .gitea/workflows/ci.yml | 2 +- templates/toolchain/ci_failure.md | 9 +++++++++ templates/toolchain/deploy_failure.md | 8 ++++++++ templates/toolchain/issue_assigned.md | 9 +++++++++ templates/toolchain/review_request.md | 17 +++++++++++++++++ templates/toolchain/review_result.md | 9 +++++++++ 6 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 templates/toolchain/ci_failure.md create mode 100644 templates/toolchain/deploy_failure.md create mode 100644 templates/toolchain/issue_assigned.md create mode 100644 templates/toolchain/review_request.md create mode 100644 templates/toolchain/review_result.md diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a6faf46..6029877 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -81,7 +81,7 @@ jobs: -H "Authorization: token $GITEA_TOKEN" \ -H "Content-Type: application/json" \ "${{ gitea.api_url }}/repos/${{ gitea.repository }}/issues/${PR_NUMBER}/comments" \ - -d "{\"body\": \"❌ **CI 失败**\\n\\n请检查 CI 日志并修复。\\n\\n触发 commit: \`${{ gitea.sha }}\`\"}" \ + -d "{\"body\": \"[CI] 失败\\n\\n分支: ${{ gitea.ref_name }}\\n触发 commit: \`${{ gitea.sha }}\`\\n请检查 CI 日志并修复。\"}" \ || echo "Failed to post PR comment" echo "PR comment posted." else diff --git a/templates/toolchain/ci_failure.md b/templates/toolchain/ci_failure.md new file mode 100644 index 0000000..380c287 --- /dev/null +++ b/templates/toolchain/ci_failure.md @@ -0,0 +1,9 @@ +CI 失败 + +PR: http://192.168.2.154:3000/{repo}/pulls/{pr_number} +分支: {branch} + +错误摘要: +{error_summary} + +请检查 CI 日志并修复。修复后 push 会自动触发 CI。 diff --git a/templates/toolchain/deploy_failure.md b/templates/toolchain/deploy_failure.md new file mode 100644 index 0000000..df198a5 --- /dev/null +++ b/templates/toolchain/deploy_failure.md @@ -0,0 +1,8 @@ +部署失败 + +仓库: {repo} +Commit: {commit_sha} + +需人工介入排查。请检查 deploy 日志并手动处理。 + +——系统通知(工具链事件中枢) diff --git a/templates/toolchain/issue_assigned.md b/templates/toolchain/issue_assigned.md new file mode 100644 index 0000000..31b9f34 --- /dev/null +++ b/templates/toolchain/issue_assigned.md @@ -0,0 +1,9 @@ +Issue 指派 + +Issue: http://192.168.2.154:3000/{repo}/issues/{issue_number} +标题: {issue_title} +标签: {labels} +描述: +{issue_body} + +建议分支名: fix/{issue_number}-{brief} diff --git a/templates/toolchain/review_request.md b/templates/toolchain/review_request.md new file mode 100644 index 0000000..7dcb008 --- /dev/null +++ b/templates/toolchain/review_request.md @@ -0,0 +1,17 @@ +PR Review 请求 + +PR: http://192.168.2.154:3000/{repo}/pulls/{pr_number} +标题: {pr_title} +作者: {pr_author} +分支: {branch} +风险级别: {risk_level} +改动文件: +{file_list} + +流程: +1. 读取 PR diff(Gitea API: GET /repos/{repo}/pulls/{pr_number}.diff) +2. 按审查清单审查(参考 code-review Skill) +3. 提交 Review(Gitea API: POST /repos/{repo}/pulls/{pr_number}/reviews) +4. 提交后改动者会自动收到通知 + +完成后回复此 Mail 确认。 diff --git a/templates/toolchain/review_result.md b/templates/toolchain/review_result.md new file mode 100644 index 0000000..d292634 --- /dev/null +++ b/templates/toolchain/review_result.md @@ -0,0 +1,9 @@ +Review 结果: {result} + +PR: http://192.168.2.154:3000/{repo}/pulls/{pr_number} +标题: {pr_title} +审查者: {reviewer} + +{review_body} + +如需修改请更新 PR 后重新请求 Review。