Skip to content

Conversation

@Rohit3523
Copy link
Contributor

@Rohit3523 Rohit3523 commented Jan 16, 2026

Proposed changes

Play Store enforces a 500 character limit for changelogs, but the existing logic was validating against 500 bytes. This allowed multibyte characters to pass the check, causing uploads to fail at release time.
This PR introduces a Node.js script that correctly counts characters and trims the changelog to a maximum of 500 characters, ensuring Play Store uploads succeed reliably.

Action Link: https://github.com/RocketChat/Rocket.Chat.ReactNative/actions/runs/21064075567

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1634

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

Walkthrough

This pull request refactors the Android changelog preparation workflow by extracting inline truncation logic from a GitHub Action into a dedicated Node.js script that properly handles Unicode grapheme clusters.

Changes

Cohort / File(s) Summary
GitHub Actions Configuration
/.github/actions/upload-android/action.yml
Replaced 8 lines of inline changelog truncation logic with a call to prepare-changelog.js Node script. Preserves default message behavior when changelog.txt is absent.
Changelog Processing Script
/.github/scripts/prepare-changelog.js
New Node.js script that reads changelog.txt, splits content into grapheme clusters, truncates to 500 grapheme units with "..." suffix if needed, and writes output to android/fastlane/metadata/android/en-US/changelogs/${BUILD_VERSION}.txt.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • chore: changelog in beta release #6899 — Introduced the inline changelog truncation logic in the GitHub Action that this PR extracts into a dedicated script for better maintainability and grapheme-aware handling.

Suggested reviewers

  • diegolmello

Poem

🐰 A changelog hops through grapheme streams,
Five hundred clusters, bursting at the seams,
With careful dots to mark the end,
Now scripts and actions perfectly blend,
Unicode-safe, our beta builds transcend! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses CORE-1634's requirement to include changelogs with PR titles in beta releases by implementing a Node script to prepare and truncate Android changelog content.
Out of Scope Changes check ✅ Passed All changes focus on Android changelog preparation through script refactoring and are directly aligned with the linked issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(Android): fix CI generated changelog' directly describes the main change—replacing inline changelog logic with a Node script for proper Android changelog generation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch android-changelog-fix

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.

@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build January 16, 2026 13:00 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build January 16, 2026 13:00 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to official_android_build January 16, 2026 13:00 — with GitHub Actions Error
@Rohit3523 Rohit3523 marked this pull request as ready for review January 16, 2026 15:42
@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing January 16, 2026 15:42 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build January 16, 2026 15:45 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build January 16, 2026 15:45 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_android_build January 16, 2026 15:45 — with GitHub Actions Waiting
@diegolmello diegolmello changed the title chore: android changelog fix chore(Android): fix CI generated changelog Jan 16, 2026
@Rohit3523 Rohit3523 merged commit c079de0 into develop Jan 16, 2026
5 of 10 checks passed
@Rohit3523 Rohit3523 deleted the android-changelog-fix branch January 16, 2026 17:57
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.

3 participants