Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/react-native-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ jobs:
PR_BODY=$(gh pr view "$PR_FROM_COMMIT" --json body --jq '.body' 2>/dev/null || echo "")

if [ -n "$PR_BODY" ]; then
echo "PR body length: ${#PR_BODY}"
NOTES="$(extract_release_notes "$PR_BODY")"
echo "Extracted notes length: ${#NOTES}"
else
echo "Warning: PR body is empty"
fi
else
echo "No PR reference in commit message, searching by commit SHA..."
Expand All @@ -370,18 +374,22 @@ jobs:
PR_BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body' 2>/dev/null || echo "")

if [ -n "$PR_BODY" ]; then
echo "PR body length: ${#PR_BODY}"
NOTES="$(extract_release_notes "$PR_BODY")"
echo "Extracted notes length: ${#NOTES}"
else
echo "Warning: PR body is empty"
fi
else
echo "No associated PR found for this commit"
fi
fi
fi

# Fallback to recent commits if no PR body found
# Fallback to recent commits if no PR body found (skip merge commits)
if [ -z "$NOTES" ]; then
echo "No PR body found, using recent commits..."
NOTES="$(git log -n 5 --pretty=format:'- %s')"
echo "No PR body found, using recent commits (excluding merge commits)..."
NOTES="$(git log -n 10 --pretty=format:'- %s' --no-merges | head -n 5)"
fi

# Fail if no notes extracted
Expand Down
Loading