From 474918ec667cfd97be6298406923622fd4956b90 Mon Sep 17 00:00:00 2001 From: auto-approve-bot Date: Wed, 9 Sep 2026 12:46:08 +0800 Subject: [PATCH 1/2] fix: add heading to Step 5 single video for E2E test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 5 单视频场景缺少 🎬 确认生成 heading,导致 Playwright E2E 测试 core-generation.spec.ts 超时失败(getByRole('heading', { name: '🎬 确认生成' }))。 修改 GeneratePage.tsx: - 在单视频 Step 5 容器顶部加

🎬 确认生成

- 外层 div flex 布局改为 column + center,保证垂直居中 Closes: E2E 连续 6 次 develop push 失败问题 --- apps/web/src/pages/generate/GeneratePage.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/web/src/pages/generate/GeneratePage.tsx b/apps/web/src/pages/generate/GeneratePage.tsx index e638e7c34..54c0863b9 100644 --- a/apps/web/src/pages/generate/GeneratePage.tsx +++ b/apps/web/src/pages/generate/GeneratePage.tsx @@ -548,10 +548,21 @@ const GeneratePage: React.FC = () => {
+

+ 🎬 确认生成 +

Date: Wed, 9 Sep 2026 13:17:30 +0800 Subject: [PATCH 2/2] ci: harden check-frontend-only with git diff fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 加 pull-requests: read 权限,避免 github.token 调 /pulls/files 403 - check-frontend-only 优先用 git diff 判断 PR 改动范围,API 失败时自动 fallback - 修复 #48555 Check if frontend-only change 失败导致 unit-tests 跑全量 diff-cover 被误拦 Closes: CI 纯前端 PR 误跑 Python 测试被覆盖率门槛拦截问题 --- .gitea/workflows/ci-pipeline.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-pipeline.yml b/.gitea/workflows/ci-pipeline.yml index de0a655b5..c42638cf3 100755 --- a/.gitea/workflows/ci-pipeline.yml +++ b/.gitea/workflows/ci-pipeline.yml @@ -20,6 +20,7 @@ on: default: "手动触发 - CI漏触发补跑" permissions: contents: read + pull-requests: read concurrency: group: ci-pipeline-${{ gitea.ref }} cancel-in-progress: true @@ -88,9 +89,22 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: | set -eu + # 优先用 git diff 判断 PR 改动范围(比 API 稳定) PR_NUMBER=$(echo "$GITHUB_REF" | sed 's|refs/pull/||; s|/.*||') - API_URL="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/files?limit=300" - FILES=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" "$API_URL" | python3 -c "import sys,json; [print(f['filename']) for f in json.load(sys.stdin)]") + if command -v git >/dev/null 2>&1 && [ -d .git ]; then + FILES=$(git diff --name-only origin/develop...HEAD 2>/dev/null || true) + fi + if [ -z "${FILES:-}" ]; then + # fallback 到 API + API_URL="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PR_NUMBER}/files?limit=300" + FILES=$(curl -sf -H "Authorization: token ${GITHUB_TOKEN}" "$API_URL" | python3 -c "import sys,json; [print(f['filename']) for f in json.load(sys.stdin)]" 2>/dev/null || true) + fi + if [ -z "${FILES:-}" ]; then + echo "⚠️ 无法获取变更文件列表,保守运行完整 CI" + echo "skip_backend=false" >> $GITHUB_OUTPUT + echo "skip_frontend=false" >> $GITHUB_OUTPUT + exit 0 + fi FRONTEND_COUNT=$(echo "$FILES" | grep -c '^apps/web/' || true) BACKEND_COUNT=$(echo "$FILES" | grep -cv '^apps/web/' || true) TOTAL=$(echo "$FILES" | grep -cv '^$' || true) -- 2.54.0