From 84f1f9f021ffb387b05bd37a2c75df119dc9cd0e Mon Sep 17 00:00:00 2001 From: OG T Date: Sun, 5 Apr 2026 14:25:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor(config):=20GITHUB=5FWEBHOOK=5FSECRET?= =?UTF-8?q?=20=E2=86=92=20GITEA=5FWEBHOOK=5FSECRET=20(ADR-059)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/core/config.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/api/src/core/config.py b/apps/api/src/core/config.py index 0e1f6bad..3b029584 100644 --- a/apps/api/src/core/config.py +++ b/apps/api/src/core/config.py @@ -485,20 +485,21 @@ class Settings(BaseSettings): # ========================================================================== # Phase 13.1: GitHub Webhook → OpenClaw 整合 - # GitHub PR/Push 事件自動觸發 AI 代碼審查 + # Gitea PR/Push 事件自動觸發 AI 代碼審查 (ADR-059: GitHub → Gitea 遷移) # ========================================================================== - GITHUB_WEBHOOK_SECRET: str = Field( + GITEA_WEBHOOK_SECRET: str = Field( default="", - description="GitHub Webhook secret for signature verification (X-Hub-Signature-256)", + description="Gitea Webhook secret for HMAC-SHA256 signature verification (X-Gitea-Signature)", ) - GITHUB_ALLOWED_REPOS: str = Field( - default="", - description="Comma-separated list of allowed repositories (e.g., 'owner/repo1,owner/repo2')", + GITEA_ALLOWED_REPOS: str = Field( + default="wooo/awoooi", + description="Comma-separated list of allowed Gitea repositories (e.g., 'wooo/awoooi')", ) - def get_github_allowed_repos(self) -> list[str]: + def get_gitea_allowed_repos(self) -> list[str]: """Parse comma-separated allowed repos to list""" - raw = self.GITHUB_ALLOWED_REPOS + # 2026-04-05 Claude Code (ADR-059): GitHub → Gitea webhook 遷移 + raw = self.GITEA_ALLOWED_REPOS if not raw or not raw.strip(): return [] return [repo.strip() for repo in raw.split(",") if repo.strip()]