feat(harness): standardize Gitea API token priority - add GITEA_TOKEN_BAIK alias across all harness tools [WBS-10]
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Failing after 11s
Validators (Pushes and Pull Requests) / validate-core (push) Failing after 18s

This commit is contained in:
2026-07-24 13:17:41 +09:00
parent 482dedbe22
commit 678e0cd301
4 changed files with 293 additions and 17 deletions
+6 -11
View File
@@ -17,17 +17,12 @@ DEFAULT_REPO = "myfinance"
def _token() -> str:
# GITEA_TOKEN 환경 변수가 우선
token = os.environ.get("GITEA_TOKEN", "")
if not token.strip():
# 없으면 GITEA_TOKEN_TAXBAIK fallback
token = os.environ.get("GITEA_TOKEN_TAXBAIK", "")
if not token.strip():
# legacy fallback
token = os.environ.get("GITEA_TOKEN_HOME", "")
if not token.strip():
raise SystemExit("GITEA_TOKEN 또는 GITEA_TOKEN_TAXBAIK 환경 변수가 설정되어 있지 않습니다.")
return token.strip()
# 토큰 우선순위: GITEA_TOKEN_BAIK → GITEA_TOKEN_TAXBAIK → GITEA_TOKEN → GITEA_TOKEN_HOME
for env_key in ("GITEA_TOKEN_BAIK", "GITEA_TOKEN_TAXBAIK", "GITEA_TOKEN", "GITEA_TOKEN_HOME"):
val = os.environ.get(env_key, "").strip()
if val:
return val
raise SystemExit("GITEA_TOKEN_BAIK 또는 GITEA_TOKEN_TAXBAIK 환경 변수가 설정되어 있지 않습니다.")
def _request_json(url: str, token: str, method: str = "GET", body: dict[str, Any] | None = None) -> tuple[int, str, Any]: