From 55e66b2aabefffe1da2a5620352da552fa1e1574 Mon Sep 17 00:00:00 2001 From: Peter Zhang <18501667167@qq.com> Date: Fri, 5 Jun 2026 14:45:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=BF=81=E7=A7=BB=20Gitea=20URL=20l?= =?UTF-8?q?ocalhost:3000=20=E2=86=92=20git.zywl.me=20-=20Closes=20#90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新所有工作流、脚本、Agent 指引中的 URL,重新生成 API token。 修复 git hooks 指向 Docker 路径。 Co-Authored-By: Claude Opus 4.7 --- .gitea/workflows/acceptance.yml | 2 +- .gitea/workflows/auto-issue.yml | 2 +- .gitea/workflows/ci.yml | 2 +- GITEA_CICD_SETUP.md | 16 ++++++++-------- agents/DEV_AGENT.md | 2 +- agents/QE_AGENT.md | 2 +- docs/PROJECT_CHARTER.md | 2 +- scripts/_common.sh | 2 +- scripts/agent_poller.py | 2 +- scripts/create_failure_issue.py | 2 +- scripts/start_dev_agent.bat | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/acceptance.yml b/.gitea/workflows/acceptance.yml index fc12d2b..eb051ed 100644 --- a/.gitea/workflows/acceptance.yml +++ b/.gitea/workflows/acceptance.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout main branch run: | - git clone --depth 1 http://localhost:3000/pzhang_zywl/document_analyzer.git . + git clone --depth 1 https://git.zywl.me/pzhang_zywl/document_analyzer.git . git checkout main - name: Install dependencies diff --git a/.gitea/workflows/auto-issue.yml b/.gitea/workflows/auto-issue.yml index cb7708a..c01a999 100644 --- a/.gitea/workflows/auto-issue.yml +++ b/.gitea/workflows/auto-issue.yml @@ -23,5 +23,5 @@ jobs: -H "Content-Type: application/json" \ -d "{\"title\":\"CI Failure: ${COMMIT_MSG}\",\"body\":\"## CI 测试失败\n\n- **Commit:** ${SHA_SHORT}\n- **Branch:** ${BRANCH}\n- **工作流:** ${RUN_URL}\n\n请检查上述链接查看失败详情。\n\n### 下一步\n- [ ] 分析失败原因\n- [ ] 修复代码\n- [ ] 提交 PR 触发 CI 重测\",\"labels\":[\"ci-failure\",\"agent-task\"]}" env: - GITEA_URL: http://localhost:3000 + GITEA_URL: https://git.zywl.me GITEA_REPO: pzhang_zywl/document_analyzer diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cba43e7..1a2e94d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Checkout code from Gitea run: | - git clone --depth 1 http://localhost:3000/pzhang_zywl/document_analyzer.git . + git clone --depth 1 https://git.zywl.me/pzhang_zywl/document_analyzer.git . git fetch origin ${{ github.sha }} git checkout ${{ github.sha }} diff --git a/GITEA_CICD_SETUP.md b/GITEA_CICD_SETUP.md index db88a4d..95af947 100644 --- a/GITEA_CICD_SETUP.md +++ b/GITEA_CICD_SETUP.md @@ -15,7 +15,7 @@ Gitea (localhost:3000) Dev Agent | 组件 | 位置 | 说明 | |------|------|------| -| Gitea 服务 | `http://localhost:3000` | SQLite 数据库,Actions 已启用 | +| Gitea 服务 | `https://git.zywl.me` | SQLite 数据库,Actions 已启用 | | Actions Runner | `C:\Users\peterz\tools\act_runner\` | Shell 模式,v0.2.11 | | 仓库 | `pzhang_zywl/document_analyzer` | 22+ 文件,CI/CD 已配置 | | API Token | 用户自行生成 | Settings → Applications → Generate Token | @@ -36,12 +36,12 @@ nohup ./gitea.exe web --config /c/Users/peterz/tools/gitea/data/app.ini > data/g nohup /c/Users/peterz/tools/act_runner/act_runner.exe daemon > /c/Users/peterz/tools/act_runner/runner.log 2>&1 & ``` -访问 `http://localhost:3000` 即可使用。 +访问 `https://git.zywl.me` 即可使用。 ### 2. 创建 Gitea API Token 1. 登录 Gitea → 右上角头像 → Settings → Applications -2. 或在浏览器直接打开: `http://localhost:3000/user/settings/applications` +2. 或在浏览器直接打开: `https://git.zywl.me/user/settings/applications` 3. Manage Access Tokens → Generate Token 4. 权限勾选: `write:issue` `write:repository` `write:user` 5. 复制 token 备用 @@ -56,7 +56,7 @@ nohup /c/Users/peterz/tools/act_runner/act_runner.exe daemon > /c/Users/peterz/t ```bash export GITEA_API_TOKEN="你的token" -export GITEA_URL="http://localhost:3000" +export GITEA_URL="https://git.zywl.me" export GITEA_REPO="pzhang_zywl/document_analyzer" ``` @@ -101,7 +101,7 @@ git clone → pip install → pytest → **Bash/WSL/Git Bash:** ```bash export GITEA_API_TOKEN="59117246ec418d5d87042de073b0d4197d8054bf" -export GITEA_URL="http://localhost:3000" +export GITEA_URL="https://git.zywl.me" export GITEA_REPO="pzhang_zywl/document_analyzer" ``` @@ -142,7 +142,7 @@ claude --agent agents/DEV_AGENT.md 在 Claude Code 对话中直接说: -> 用 DEV_AGENT.md 检查 http://localhost:3000/pzhang_zywl/document_analyzer/issues 有没有待处理工单 +> 用 DEV_AGENT.md 检查 https://git.zywl.me/pzhang_zywl/document_analyzer/issues 有没有待处理工单 ### 方式 D: 任何其他 Agent @@ -182,7 +182,7 @@ python scripts/agent_poller.py --action create-pr --issue N --branch fix/issue-N 1. 在 `tests/test_sample.py` 中添加故意失败的测试 2. Push → CI 变红 → 自动在 Gitea 创建 Issue(含失败详情) -3. 查看: `http://localhost:3000/pzhang_zywl/document_analyzer/issues` +3. 查看: `https://git.zywl.me/pzhang_zywl/document_analyzer/issues` ### 测试修复 → CI 通过 → Issue 关闭 @@ -203,5 +203,5 @@ python scripts/agent_poller.py --action create-pr --issue N --branch fix/issue-N **Q: Agent 连不上 Gitea API?** - 确认 `GITEA_API_TOKEN` 环境变量已设置 -- 确认 Gitea 服务正在运行: `curl http://localhost:3000/api/v1/version` +- 确认 Gitea 服务正在运行: `curl https://git.zywl.me/api/v1/version` - 确认 Token 权限包含 `write:issue` 和 `write:repository` diff --git a/agents/DEV_AGENT.md b/agents/DEV_AGENT.md index 377c418..cb03dca 100644 --- a/agents/DEV_AGENT.md +++ b/agents/DEV_AGENT.md @@ -44,7 +44,7 @@ description: AI 开发专家,负责 document_analyzer 项目的功能开发、 代理需要以下环境变量与 Gitea 交互: -- `GITEA_URL` — `http://localhost:3000` +- `GITEA_URL` — `https://git.zywl.me` - `GITEA_REPO` — `pzhang_zywl/document_analyzer` - `GITEA_API_TOKEN` — Gitea 个人访问令牌 - `DEV_AGENT_ID` — 代理标识(默认 `da-01`,启动脚本自动设为 `da-MMDD-HHmm`) diff --git a/agents/QE_AGENT.md b/agents/QE_AGENT.md index 6743ab7..f8b8565 100644 --- a/agents/QE_AGENT.md +++ b/agents/QE_AGENT.md @@ -34,7 +34,7 @@ description: QE Agent — 自动化验收测试开发与质量门禁。轮询 Gi 开始工作前,确认以下环境变量已设置: ```bash -export GITEA_URL="http://localhost:3000" +export GITEA_URL="https://git.zywl.me" export GITEA_REPO="pzhang_zywl/document_analyzer" export GITEA_API_TOKEN="" ``` diff --git a/docs/PROJECT_CHARTER.md b/docs/PROJECT_CHARTER.md index 61d7767..7433edb 100644 --- a/docs/PROJECT_CHARTER.md +++ b/docs/PROJECT_CHARTER.md @@ -33,7 +33,7 @@ ## 项目环境 - 项目目录:`C:\Users\peterz\projects\document_analyzer` -- Gitea 仓库:`http://localhost:3000/pzhang_zywl/document_analyzer` +- Gitea 仓库:`https://git.zywl.me/pzhang_zywl/document_analyzer` - CI/CD:Gitea Actions,配置文件 `ci.yml` - LLM 配置:`~/.openclaw/config/secrets.yaml` - Agent 定义:`agents/DEV_AGENT.md`、`agents/QE_AGENT.md` diff --git a/scripts/_common.sh b/scripts/_common.sh index 7d2f21f..322f7c0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -14,7 +14,7 @@ if [ -f "$_COMMON_DIR/.env" ]; then fi # ── Default environment variables ────────────────────────────────────────────── -export GITEA_URL="${GITEA_URL:-http://localhost:3000}" +export GITEA_URL="${GITEA_URL:-https://git.zywl.me}" export GITEA_REPO="${GITEA_REPO:-pzhang_zywl/document_analyzer}" # ── Validate required environment ────────────────────────────────────────────── diff --git a/scripts/agent_poller.py b/scripts/agent_poller.py index a4367d1..030ffeb 100644 --- a/scripts/agent_poller.py +++ b/scripts/agent_poller.py @@ -21,7 +21,7 @@ import sys import urllib.request import urllib.error -GITEA_URL = os.environ.get("GITEA_URL", "http://localhost:3000") +GITEA_URL = os.environ.get("GITEA_URL", "https://git.zywl.me") GITEA_REPO = os.environ.get("GITEA_REPO", "pzhang_zywl/document_analyzer") GITEA_TOKEN = os.environ.get("GITEA_API_TOKEN", "") DEV_AGENT_ID = os.environ.get("DEV_AGENT_ID", "da-01") diff --git a/scripts/create_failure_issue.py b/scripts/create_failure_issue.py index 20691e3..10e65a9 100644 --- a/scripts/create_failure_issue.py +++ b/scripts/create_failure_issue.py @@ -6,7 +6,7 @@ import os import urllib.request import urllib.error -GITEA_URL = "http://localhost:3000" +GITEA_URL = "https://git.zywl.me" REPO = "pzhang_zywl/document_analyzer" diff --git a/scripts/start_dev_agent.bat b/scripts/start_dev_agent.bat index f9dfbcb..2f55518 100644 --- a/scripts/start_dev_agent.bat +++ b/scripts/start_dev_agent.bat @@ -11,7 +11,7 @@ if exist "scripts\.env" ( ) :: ── Defaults ────────────────────────────────────────────────────────────────── -if "%GITEA_URL%"=="" set GITEA_URL=http://localhost:3000 +if "%GITEA_URL%"=="" set GITEA_URL=https://git.zywl.me if "%GITEA_REPO%"=="" set GITEA_REPO=pzhang_zywl/document_analyzer if "%DEV_AGENT_ID%"=="" set DEV_AGENT_ID=da-01 -- 2.52.0 From 040d43d7f90b17a0ea4fe6a4ba5804b6ad81fe5e Mon Sep 17 00:00:00 2001 From: Peter Zhang <18501667167@qq.com> Date: Fri, 5 Jun 2026 14:48:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E8=BF=81=E7=A7=BB=20Gitea=20URL=20l?= =?UTF-8?q?ocalhost:3000=20=E2=86=92=20git.zywl.me=20-=20Closes=20#90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新所有工作流、脚本、Agent 指引中的 URL,重新生成 API token。 修复 git hooks 指向 Docker 路径。 Co-Authored-By: Claude Opus 4.7 -- 2.52.0