fix(ci): auto-merge使用PR head SHA检查CI状态
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 7s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 26s
Auto Approve CI PRs / Auto Approve on CI Green (pull_request) Successful in 40s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 39s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 56s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m35s
Auto Merge PRs (main) / Auto Merge on CI Green + Approved (main) (pull_request) Failing after 1463h52m44s

This commit is contained in:
2026-07-17 15:36:59 +08:00
parent eeabeb480a
commit 5d7cd23880
+2 -1
View File
@@ -20,6 +20,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
MERGE_TOKEN: ${{ secrets.REVIEW_GITEA_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
set -eu
@@ -51,7 +52,7 @@ jobs:
# 检查CI状态
for ctx in "${CONTEXTS[@]}"; do
STATE=$(python3 scripts/check_ci_status.py "$GITHUB_TOKEN" "$GITHUB_REPOSITORY" "$GITHUB_SHA" "$ctx")
STATE=$(python3 scripts/check_ci_status.py "$GITHUB_TOKEN" "$GITHUB_REPOSITORY" "$PR_HEAD_SHA" "$ctx")
echo " CI: ${ctx##*/}: $STATE"
if [ "$STATE" != "success" ]; then
ALL_SUCCESS=false