fix: GITEA_API_TOKEN 从 .env 文件读取,不再硬编码或提交到仓库
CI / test (pull_request) Successful in 10s

- scripts/.env 存储敏感配置(已加入 .gitignore)
- start_dev_agent.sh 启动时自动 source .env
- 环境变量仍可作为 fallback

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 19:33:57 +08:00
parent e7d5a28db4
commit 42e8dbe025
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -4,6 +4,12 @@
set -e
# Source local secrets if available (not tracked by git)
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
if [ -f "$SCRIPT_DIR/.env" ]; then
source "$SCRIPT_DIR/.env"
fi
# Load from environment or default values
export GITEA_API_TOKEN="${GITEA_API_TOKEN:-}"
export GITEA_URL="${GITEA_URL:-http://localhost:3000}"