40567a4fb6
CI / test (push) Successful in 30s
- 4 skill pipeline (doc_parser, conflict_detection, ir_generation, resolution_application) - CI workflow on push/PR (.gitea/workflows/ci.yml) - Auto-issue on CI failure (.gitea/workflows/auto-issue.yml) - Pytest smoke tests (tests/test_sample.py) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
1.2 KiB
YAML
28 lines
1.2 KiB
YAML
name: Auto Issue on CI Failure
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["CI"]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
auto-issue:
|
|
runs-on: shell
|
|
if: github.event.workflow_run.conclusion == 'failure'
|
|
steps:
|
|
- name: Create failure issue
|
|
run: |
|
|
SHA="${{ github.event.workflow_run.head_sha }}"
|
|
SHA_SHORT="${SHA:0:7}"
|
|
BRANCH="${{ github.event.workflow_run.head_branch }}"
|
|
RUN_URL="${{ github.event.workflow_run.html_url }}"
|
|
COMMIT_MSG="${{ github.event.workflow_run.head_commit.message }}"
|
|
|
|
curl -s -X POST "${{ env.GITEA_URL }}/api/v1/repos/${{ env.GITEA_REPO }}/issues" \
|
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d "{\"title\":\"CI Failure: ${COMMIT_MSG}\",\"body\":\"## CI 测试失败\n\n- **Commit:** ${SHA_SHORT}\n- **Branch:** ${BRANCH}\n- **工作流:** ${RUN_URL}\n\n请检查上述链接查看失败详情。\n\n### 下一步\n- [ ] 分析失败原因\n- [ ] 修复代码\n- [ ] 提交 PR 触发 CI 重测\",\"labels\":[\"ci-failure\",\"agent-task\"]}"
|
|
env:
|
|
GITEA_URL: http://localhost:3000
|
|
GITEA_REPO: peterz/document_analyzer
|