From 45fd1d5874a44009ef9d2891833cae57f279ce95 Mon Sep 17 00:00:00 2001 From: yellowadmin Date: Sat, 25 Jul 2026 06:19:16 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=96=B0=E5=A2=9E=20Gitea=20Actions=20wo?= =?UTF-8?q?rkflow=20=E8=AE=93=20Claude=20=E5=9B=9E=E6=87=89=20issue/PR=20?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=20(#8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 摘要 新增 `.gitea/workflows/claude.yml`,以 `markwylde/claude-code-gitea-action@v1.0.20` 掛在 issue/PR 事件上,讓 Claude 能回應留言與審查。 單一檔案、26 行、無既有檔案異動。 ## 內容 - 觸發事件:`issue_comment`(created)、`pull_request_review_comment`(created)、`issues`(opened/assigned/labeled)、`pull_request_review`(submitted) - runner label:`yellow-zeabur-runner` - `GITEA_SERVER_URL` 覆寫為 `https://yellow-git.zeabur.app`,避免容器內部連結 `http://gitea:3000` 在外部無法存取 ## 前提 合併後要生效,需 repo 已設定 secrets `ANTHROPIC_API_KEY` 與 `USER_TOKEN`,且 runner label `yellow-zeabur-runner` 已註冊。 ## 審核注意 - 不含任何 `raw/`、`wiki/` 內容或 manifest 帳本變更(AGENTS.md §1.4/§14 不受影響)。 - 本分支原本還帶著 4 個 commit,但那些內容已由 PR #1 與 #5 squash 合併進 main;分支已重設到 main 之上,只保留這一支 commit。 Co-authored-by: LittleYellow Reviewed-on: https://yellow-git.zeabur.app/yellowadmin/pp-qa-km/pulls/8 --- .gitea/workflows/claude.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/claude.yml diff --git a/.gitea/workflows/claude.yml b/.gitea/workflows/claude.yml new file mode 100644 index 0000000..389a2c9 --- /dev/null +++ b/.gitea/workflows/claude.yml @@ -0,0 +1,26 @@ +name: Claude Assistant +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + issues: + types: [opened, assigned, labeled] + pull_request_review: + types: [submitted] + +jobs: + claude-response: + runs-on: yellow-zeabur-runner + steps: + - uses: actions/checkout@v4 + - uses: markwylde/claude-code-gitea-action@v1.0.20 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + gitea_token: ${{ secrets.USER_TOKEN }} + claude_git_name: Claude + claude_git_email: claude@anthropic.com + env: + # 如果 Gitea 跑在容器裡,內部連結會變成 http://gitea:3000, + # 用這個覆寫成外部可存取的網址 + GITEA_SERVER_URL: https://yellow-git.zeabur.app \ No newline at end of file