@@ -352,7 +352,11 @@ jobs:
352352 PR_BODY=$(gh pr view "$PR_FROM_COMMIT" --json body --jq '.body' 2>/dev/null || echo "")
353353
354354 if [ -n "$PR_BODY" ]; then
355+ echo "PR body length: ${#PR_BODY}"
355356 NOTES="$(extract_release_notes "$PR_BODY")"
357+ echo "Extracted notes length: ${#NOTES}"
358+ else
359+ echo "Warning: PR body is empty"
356360 fi
357361 else
358362 echo "No PR reference in commit message, searching by commit SHA..."
@@ -370,18 +374,22 @@ jobs:
370374 PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body' 2>/dev/null || echo "")
371375
372376 if [ -n "$PR_BODY" ]; then
377+ echo "PR body length: ${#PR_BODY}"
373378 NOTES="$(extract_release_notes "$PR_BODY")"
379+ echo "Extracted notes length: ${#NOTES}"
380+ else
381+ echo "Warning: PR body is empty"
374382 fi
375383 else
376384 echo "No associated PR found for this commit"
377385 fi
378386 fi
379387 fi
380388
381- # Fallback to recent commits if no PR body found
389+ # Fallback to recent commits if no PR body found (skip merge commits)
382390 if [ -z "$NOTES" ]; then
383- echo "No PR body found, using recent commits..."
384- NOTES="$(git log -n 5 --pretty=format:'- %s')"
391+ echo "No PR body found, using recent commits (excluding merge commits) ..."
392+ NOTES="$(git log -n 10 --pretty=format:'- %s' --no-merges | head -n 5 )"
385393 fi
386394
387395 # Fail if no notes extracted
0 commit comments