We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf818e0 commit 112ce75Copy full SHA for 112ce75
1 file changed
.github/workflows/codeql-to-commit.yml
@@ -75,11 +75,12 @@ jobs:
75
BRANCH="autofix/${SEC_LEVEL}/alert-${NUMBER}"
76
77
# 检查分支是否已存在
78
- BRANCH_EXISTS=$(gh api \
+ BRANCH_STATUS=$(gh api \
79
/repos/$OWNER/$REPO/git/refs/heads/$BRANCH \
80
- --jq '.ref' 2>/dev/null || echo "")
+ --silent 2>/dev/null && echo "exists" || echo "not_found")
81
+ echo "DEBUG branch status: $BRANCH_STATUS"
82
- if [ -n "$BRANCH_EXISTS" ]; then
83
+ if [ "$BRANCH_STATUS" = "exists" ]; then
84
echo "⏭️ Branch $BRANCH already exists, skipping"
85
continue
86
fi
0 commit comments