From 5eaf4fb9318de6217b6b016c50268075b24e8336 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 13 Jun 2026 18:05:22 +0900 Subject: [PATCH] feat: add PR CI result notification comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI 완료(성공/실패) 시 PR에 자동 코멘트 추가. Gitea 구독 알림과 연동 -> kjh2064@gmail.com 이메일 알림 발송. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 1b2b2ba..d9665ab 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -46,3 +46,19 @@ jobs: - name: Build Operational Bundle run: python3 tools/build_bundle.py + + - name: Notify PR Result + if: always() && github.event_name == 'pull_request' + run: | + STATUS="${{ job.status }}" + PR_NUM="${{ github.event.pull_request.number }}" + RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + if [ "$STATUS" = "success" ]; then + MSG="✅ **CI PASS** — gate=PASS step_count=55\n\n[워크플로우 로그](${RUN_URL})" + else + MSG="❌ **CI FAIL** — 로그 확인 필요\n\n[워크플로우 로그](${RUN_URL})" + fi + curl -s -X POST "${{ github.api_url }}/repos/${{ github.repository }}/issues/${PR_NUM}/comments" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: application/json" \ + -d "{\"body\":\"${MSG}\"}"