Skip to content

Conversation

@ucswift
Copy link
Member

@ucswift ucswift commented Nov 2, 2025

Summary by CodeRabbit

  • Chores
    • Improved release notes extraction by filtering out auto-generated summaries from PR bodies.
    • Updated internal API payload structure for release notes processing to use a nested schema format for better organization.

@coderabbitai
Copy link

coderabbitai bot commented Nov 2, 2025

Walkthrough

The React Native CI/CD workflow is updated to clean release notes extraction by removing CodeRabbit-generated summary sections and refactors the Changerawr API payload structure from flat scalar fields to a nested JSON schema with content, title, and tags properties.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/react-native-cicd.yml
Release notes extraction now strips "Summary by CodeRabbit" section from PR body before parsing "## Release Notes" content. Changerawr API payload refactored from flat structure (version, releaseNotes, platform, buildNumber, commitSha, buildUrl, timestamp) to nested schema with "title" ("Release v"), "content", and "tags" array; timestamp field removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify PR body cleaning logic correctly removes CodeRabbit section without breaking release notes extraction
  • Validate new nested payload structure matches Changerawr API expectations
  • Confirm fallback behavior (500 character extraction) applies to cleaned body

Suggested reviewers

  • github-actions

Poem

🐰 Release notes shine so clean and bright,
CodeRabbit summaries trimmed from sight,
Payloads nested, tags arranged just right,
The workflow hops along—what a delight! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title "RU-T39 Changelog updates" is vague and uses non-descriptive terminology that fails to communicate the specific nature of the changes. While the title is loosely related to the changeset (which does involve changelog/release notes modifications), it lacks clarity and specificity about the actual technical changes. A teammate scanning the pull request history would not understand from this title that the changes involve refactoring the Changerawr API payload structure, cleaning up PR body extraction logic, or the restructuring of fields from flat scalars to nested JSON. The ticket reference "RU-T39" provides no additional technical context about what was updated. Consider revising the title to be more specific and descriptive of the actual changes, such as "Refactor Changerawr API payload structure for release notes" or "Update release notes extraction and Changerawr integration format". This would help team members quickly understand the primary technical change when reviewing pull request history.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b79d7e and 531c81e.

📒 Files selected for processing (1)
  • .github/workflows/react-native-cicd.yml (2 hunks)
🔇 Additional comments (2)
.github/workflows/react-native-cicd.yml (2)

304-321: Clean CodeRabbit summary removal before extracting release notes — LGTM.

The awk-based filtering properly removes the "## Summary by CodeRabbit" section and its content until the next header. The cleaned body is used consistently for both the targeted release notes extraction and the fallback, preventing CodeRabbit summary text from leaking into the final notes.


391-458: Verify Changerawr API compatibility with the new nested payload schema.

The refactored payload structure replaces flat fields (version, releaseNotes, platform, buildNumber, commitSha, buildUrl, timestamp) with a nested schema (version, title, content, tags array). Additionally, the timestamp field has been removed entirely. Confirm that:

  1. The Changerawr API endpoint accepts the new nested structure
  2. The timestamp removal does not break downstream processing or archival requirements
  3. The API correctly maps the tags array with id/name pairs

If you have access to Changerawr API documentation, please verify that the new schema is accepted. Alternatively, run a test build after fixes to confirm the API call succeeds and the release notes appear correctly on the backend.

Comment on lines 414 to 436
'{
version: $version,
releaseNotes: $notes,
platform: $platform,
buildNumber: $buildNumber,
commitSha: $commitSha,
buildUrl: $buildUrl,
timestamp: now | todate
"version": $version,
"title": "Release v" + $version,
"content": "$notes",
"tags": [
{
"id": "platform",
"name": "$platform"
},
{
"id": "buildNumber",
"name": "$buildNumber"
},
{
"id": "commitSha",
"name": "$commitSha"
},
{
"id": "buildUrl",
"name": "$buildUrl"
}
]
}')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Fix jq variable interpolation in JSON payload construction.

The jq filter uses quoted variable references ("$variable") within string literals, which treats them as literal strings rather than interpolating the actual values. This will cause the payload to contain literal $notes, $platform, etc. instead of their actual values.

Apply this diff to fix the variable references:

             '{
-              "version": $version,
-              "title": "Release v" + $version,
-              "content": "$notes",
+              "version": $version,
+              "title": ("Release v" + $version),
+              "content": $notes,
               "tags": [
                 {
                   "id": "platform",
-                  "name": "$platform"
+                  "name": $platform
                 },
                 {
                   "id": "buildNumber",
-                  "name": "$buildNumber"
+                  "name": $buildNumber
                 },
                 {
                   "id": "commitSha",
-                  "name": "$commitSha"
+                  "name": $commitSha
                 },
                 {
                   "id": "buildUrl",
-                  "name": "$buildUrl"
+                  "name": $buildUrl
                 }
               ]
             }')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'{
version: $version,
releaseNotes: $notes,
platform: $platform,
buildNumber: $buildNumber,
commitSha: $commitSha,
buildUrl: $buildUrl,
timestamp: now | todate
"version": $version,
"title": "Release v" + $version,
"content": "$notes",
"tags": [
{
"id": "platform",
"name": "$platform"
},
{
"id": "buildNumber",
"name": "$buildNumber"
},
{
"id": "commitSha",
"name": "$commitSha"
},
{
"id": "buildUrl",
"name": "$buildUrl"
}
]
}')
'{
"version": $version,
"title": ("Release v" + $version),
"content": $notes,
"tags": [
{
"id": "platform",
"name": $platform
},
{
"id": "buildNumber",
"name": $buildNumber
},
{
"id": "commitSha",
"name": $commitSha
},
{
"id": "buildUrl",
"name": $buildUrl
}
]
}')
🤖 Prompt for AI Agents
.github/workflows/react-native-cicd.yml around lines 414 to 436: the jq filter
currently wraps variables in quotes inside JSON strings so they become literal
names (e.g. "$notes"); fix by passing each CI variable into jq with --arg (for
string values) or --argjson (for numeric/JSON values like version/buildNumber if
appropriate) and then reference them unquoted in the jq expression (use $notes,
$platform, $buildNumber, $commitSha, $buildUrl, $version) so jq interpolates the
actual values into the JSON payload.

@ucswift
Copy link
Member Author

ucswift commented Nov 2, 2025

Approve

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is approved.

@ucswift ucswift merged commit 15e24da into master Nov 2, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants