refactor(config): GITHUB_WEBHOOK_SECRET → GITEA_WEBHOOK_SECRET (ADR-059)
This commit is contained in:
@@ -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()]
|
||||
|
||||
Reference in New Issue
Block a user