Skip to content

Commit 531c81e

Browse files
committed
RU-T39 Changelog updates
1 parent 0a7d9e3 commit 531c81e

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

.github/workflows/react-native-cicd.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,23 @@ jobs:
301301
# Function to extract release notes from PR body
302302
extract_release_notes() {
303303
local body="$1"
304+
305+
# Remove "Summary by CodeRabbit" section (including any content under it until the next header)
306+
local cleaned_body="$(printf '%s\n' "$body" \
307+
| awk '
308+
BEGIN { skip=0 }
309+
/^## Summary by CodeRabbit/ { skip=1; next }
310+
/^## / && skip==1 { skip=0 }
311+
skip==0 { print }
312+
')"
313+
304314
# Try to extract content under "## Release Notes" heading
305-
local notes="$(printf '%s\n' "$body" \
315+
local notes="$(printf '%s\n' "$cleaned_body" \
306316
| awk 'f && /^## /{exit} /^## Release Notes/{f=1; next} f')"
307317
308-
# If no specific section found, use the entire body (up to first 500 chars for safety)
318+
# If no specific section found, use the entire cleaned body (up to first 500 chars for safety)
309319
if [ -z "$notes" ]; then
310-
notes="$(printf '%s\n' "$body" | head -c 500)"
320+
notes="$(printf '%s\n' "$cleaned_body" | head -c 500)"
311321
fi
312322
313323
printf '%s\n' "$notes"
@@ -402,13 +412,27 @@ jobs:
402412
--arg commitSha "${{ github.sha }}" \
403413
--arg buildUrl "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
404414
'{
405-
version: $version,
406-
releaseNotes: $notes,
407-
platform: $platform,
408-
buildNumber: $buildNumber,
409-
commitSha: $commitSha,
410-
buildUrl: $buildUrl,
411-
timestamp: now | todate
415+
"version": $version,
416+
"title": "Release v" + $version,
417+
"content": "$notes",
418+
"tags": [
419+
{
420+
"id": "platform",
421+
"name": "$platform"
422+
},
423+
{
424+
"id": "buildNumber",
425+
"name": "$buildNumber"
426+
},
427+
{
428+
"id": "commitSha",
429+
"name": "$commitSha"
430+
},
431+
{
432+
"id": "buildUrl",
433+
"name": "$buildUrl"
434+
}
435+
]
412436
}')
413437
414438
echo "Sending release notes to Changerawr..."

0 commit comments

Comments
 (0)