Skip to content

Commit 112ce75

Browse files
committed
ci:update
1 parent cf818e0 commit 112ce75

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/codeql-to-commit.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,12 @@ jobs:
7575
BRANCH="autofix/${SEC_LEVEL}/alert-${NUMBER}"
7676
7777
# 检查分支是否已存在
78-
BRANCH_EXISTS=$(gh api \
78+
BRANCH_STATUS=$(gh api \
7979
/repos/$OWNER/$REPO/git/refs/heads/$BRANCH \
80-
--jq '.ref' 2>/dev/null || echo "")
80+
--silent 2>/dev/null && echo "exists" || echo "not_found")
81+
echo "DEBUG branch status: $BRANCH_STATUS"
8182
82-
if [ -n "$BRANCH_EXISTS" ]; then
83+
if [ "$BRANCH_STATUS" = "exists" ]; then
8384
echo "⏭️ Branch $BRANCH already exists, skipping"
8485
continue
8586
fi

0 commit comments

Comments
 (0)