You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/react-native-cicd.yml
+18-5Lines changed: 18 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -302,25 +302,38 @@ jobs:
302
302
extract_release_notes() {
303
303
local body="$1"
304
304
305
-
# Remove "Summary by CodeRabbit" section and auto-generated comment line
305
+
# First pass: Remove everything between CodeRabbit comment markers using sed
306
+
# This handles multi-line auto-generated content
306
307
local cleaned_body="$(printf '%s\n' "$body" \
307
-
| grep -v '<!-- end of auto-generated comment: release notes by coderabbit.ai -->' \
308
+
| sed '/<!-- This is an auto-generated comment: release notes by coderabbit.ai -->/,/<!-- end of auto-generated comment: release notes by coderabbit.ai -->/d')"
309
+
310
+
# Second pass: Remove the "Summary by CodeRabbit" section
311
+
cleaned_body="$(printf '%s\n' "$cleaned_body" \
308
312
| awk '
309
313
BEGIN { skip=0 }
310
314
/^## Summary by CodeRabbit/ { skip=1; next }
311
315
/^## / && skip==1 { skip=0 }
312
316
skip==0 { print }
313
317
')"
314
318
315
-
# Try to extract content under "## Release Notes" heading
319
+
# Third pass: Remove any remaining HTML comment lines
320
+
cleaned_body="$(printf '%s\n' "$cleaned_body" | sed '/^<!--.*-->$/d' | sed '/^<!--/d' | sed '/^-->$/d')"
321
+
322
+
# Fourth pass: Trim leading and trailing whitespace/empty lines
0 commit comments