Skip to content

Commit 01ebe9b

Browse files
committed
ejhkb
1 parent 4307228 commit 01ebe9b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/auto-merge-queue.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,28 @@ jobs:
331331
332332
echo "GraphQL Result: $RESULT"
333333
334+
# Debug the success conditions
335+
echo "DEBUG: ENQUEUE_FAILED='$ENQUEUE_FAILED'"
336+
echo "DEBUG: Checking for errors in result..."
337+
if echo "$RESULT" | grep -q "errors"; then
338+
echo "DEBUG: Found errors in result"
339+
else
340+
echo "DEBUG: No errors found in result"
341+
fi
342+
334343
# Check if successful
335344
if [[ "$ENQUEUE_FAILED" != "true" ]] && ! echo "$RESULT" | grep -q "errors"; then
336345
QUEUE_POSITION=$(echo "$RESULT" | jq -r '.data.enqueuePullRequest.mergeQueueEntry.position // "unknown"')
337346
echo "✅ Successfully added to merge queue at position: $QUEUE_POSITION after $RETRY_COUNT attempts"
347+
echo "DEBUG: Setting SUCCESS=true and should exit loop"
338348
339349
# Comment on PR with success
340350
gh api repos/${{ github.repository }}/issues/$PR_NUMBER/comments \
341351
-f body="🤖 Successfully added to merge queue at position **$QUEUE_POSITION** after CI success ✅ (Attempts: $RETRY_COUNT, Event: ${{ github.event_name }})"
342352
343353
SUCCESS=true
354+
echo "DEBUG: SUCCESS variable is now: $SUCCESS"
355+
break # Explicitly break out of the loop
344356
else
345357
# Extract error message
346358
ERROR_MSG=$(echo "$RESULT" | jq -r '.errors[]?.message // "Unknown error"' 2>/dev/null || echo "$RESULT")

0 commit comments

Comments
 (0)