We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 616968c + 8035f19 commit 666fdb4Copy full SHA for 666fdb4
1 file changed
.github/workflows/ai-review.yml
@@ -127,6 +127,14 @@ jobs:
127
fi
128
COMPARE_HEAD="$RESOLVED_SHA"
129
if [ "${{ github.event_name }}" = "push" ]; then
130
+ PARENT_COUNT=$(gh api "repos/$REPO/commits/$RESOLVED_SHA" --jq '.parents | length' 2>/dev/null || echo "1")
131
+ if [ "$PARENT_COUNT" -gt 1 ]; then
132
+ echo "review_mode=skip" >> "$GITHUB_OUTPUT"
133
+ echo "skip_reason=merge commit (${PARENT_COUNT} parents)" >> "$GITHUB_OUTPUT"
134
+ echo "subject_url=$URL" >> "$GITHUB_OUTPUT"
135
+ echo "target mode=skip subject=$URL range=$COMPARE_BASE..$COMPARE_HEAD skip_reason='merge commit'"
136
+ exit 0
137
+ fi
138
PR_COUNT=$(gh api "repos/$REPO/commits/$RESOLVED_SHA/pulls" \
139
-H "Accept: application/vnd.github.groot-preview+json" \
140
--jq 'length' 2>/dev/null || echo "0")
0 commit comments