fix(ci): 修复 auto_fix_formatting.py 中 git checkout 参数顺序错误
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m8s
AI Code Review / AI Code Review (pull_request) Successful in 1m50s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 4m20s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 5m23s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 21s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 1383h15m24s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1383h15m40s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1383h15m39s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1383h15m41s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1383h15m39s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1383h15m43s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1383h15m42s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1383h15m43s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1383h15m45s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1383h15m44s
CI/CD Pipeline / Check if frontend-only change (pull_request) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1383h47m54s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1383h47m53s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1383h47m49s

-B --force 会将 --force 解析为分支名导致失败
改为 -f -B 正确语法,确保 tarball checkout 模式下能正常切换到源分支
This commit is contained in:
CI Bot
2026-07-21 00:13:15 +08:00
parent 981d965d89
commit 62ee8640a6
+1 -1
View File
@@ -62,7 +62,7 @@ def ensure_git_repo(api_url, repo, token, pr_number):
# 强制checkout到源分支(覆盖tarball内容)
# tarball是merge后的commit,源分支才是我们要修改并推送的目标
print("切换到源分支...")
run(f"git checkout -B --force {head_branch} FETCH_HEAD")
run(f"git checkout -f -B {head_branch} FETCH_HEAD")
result = run("git status --porcelain")
if result.stdout.strip():