Skip to content

cherry-pick(4.7-stable): Keep unreleased changelog entries in per-package fragment files (#10642) - #10793

Merged
pawicao merged 1 commit into
4.7-stablefrom
@pawicao/4.7-stable/cherry-pick-#10642
Oct 1, 2026
Merged

pawicao merged 1 commit into
4.7-stablefrom
@pawicao/4.7-stable/cherry-pick-#10642

Conversation

@pawicao

@pawicao pawicao commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Note

This pull request was authored by AI on behalf of @pawicao.

Summary

Cherry-picking #10642 to 4.7-stable for #10656.

4.7-stable was cut before #10642, so it still has the ## Unpublished section in CHANGELOG.md and the old changelog-check. All fixes that merged to main after #10642 carry a fragment file and no CHANGELOG.md line. Without this change, changelog-check fails on each cherry-pick PR of the 4.7.1 thread, and nothing moves the fragments into CHANGELOG.md at release.

Merge this one first. The other cherry-pick PRs of #10656 then need an update from 4.7-stable for changelog-check to pass.

The cherry-pick had three conflicts. This is how the result differs from #10642 on main:

Test plan

changelog-check fails on this pull request, because it removes the ## Unpublished section and does not change a version. The same happened on #10642.

#10642)

> [!NOTE]
> This pull request was authored by AI on behalf of @pawicao.

## Summary

Every pull request that changed a package edited the same `##
Unpublished` section, so pull requests conflicted with each other. I
moved unreleased entries into one file per pull request in
`packages/<pkg>/changelog/` and left `CHANGELOG.md` with released
versions only. A fragment holds only the entry text, because the release
script reads the pull request number from the squash commit that added
the file and asks GitHub for the author. I added `changelog:add` and
`changelog:squash` to both package workspaces, the first to write a
fragment and the second to move the fragments into `CHANGELOG.md`, and I
rewrote `changelog-check` to validate fragments. I added fragments for
#10584, #10632, #10587, #10629 and #10650, which merged to `main` after
the 4.7.0 cut, and removed their lines from `CHANGELOG.md`.

## How we use the changelog from now on

- **In a pull request:** run `yarn workspace <pkg> changelog:add --type
<breaking|feature|fix|other> --message '<One sentence>'`, or write
`packages/<pkg>/changelog/<slug>.<type>.md` by hand. The script writes
into the package of the workspace, and the slug defaults to the branch
name. Do not write the pull request link or the author, and do not edit
`CHANGELOG.md`.
- **To read the unpublished entries:** `yarn workspace <pkg>
changelog:squash` prints them and changes no file.
- **In a release pull request on the stable branch:** `yarn workspace
<pkg> changelog:squash x.y.z` writes the `## x.y.z — <date>` section and
deletes the fragments.
- **In the post-release pull request on `main`:** `yarn workspace <pkg>
changelog:squash x.y.0 --date <release date> --cut origin/x.y-stable`
does the same, but leaves the fragments that came to `main` after the
stable branch was cut.
- **Cherry-picks:** the fragment comes with the cherry-pick, and the
first `(#N)` in the commit subject still points to the original pull
request.
- **When the script cannot resolve an entry:** add a `pr: <number>` or a
`by: @user1, @user2` line to the fragment. `by:` always takes
precedence.
- `changelog-check` needs a new fragment for each changed package. It
rejects edits of `CHANGELOG.md` and deleted fragments, unless the pull
request changes the package `version`, which marks a release or
post-release pull request.

## Test plan

`yarn test:scripts` passes. I also ran the three scripts in scratch
repositories with real squash merges, and the author lookup against
GitHub.

`changelog-check` fails on this pull request, because it removes the `##
Unpublished` section from both `CHANGELOG.md` files and does not change
a `version`. This is expected and happens only for this migration.

## Changelog

- [x] I added a changelog fragment with `yarn changelog:add` for each
changed package, or this PR does not change `react-native-reanimated` or
`react-native-worklets`.

(cherry picked from commit 79881d9)
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 739bb936-0642-470f-b6d2-eca428f650d1

📥 Commits

Reviewing files that changed from the base of the PR and between d36edbc and d213822.

📒 Files selected for processing (19)
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/workflows/changelog-check.yml
  • AGENTS.md
  • package.json
  • packages/react-native-reanimated/CHANGELOG.md
  • packages/react-native-reanimated/RELEASE.md
  • packages/react-native-reanimated/changelog/README.md
  • packages/react-native-reanimated/package.json
  • packages/react-native-worklets/changelog/README.md
  • scripts/__tests__/check-changelog.test.mts
  • scripts/changelog/__tests__/add.test.mts
  • scripts/changelog/__tests__/check.test.mts
  • scripts/changelog/__tests__/fragments.test.mts
  • scripts/changelog/__tests__/squash.test.mts
  • scripts/changelog/add.mts
  • scripts/changelog/check.mts
  • scripts/changelog/fragments.mts
  • scripts/changelog/squash.mts
  • scripts/check-changelog.mts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@pawicao
pawicao merged commit bf64a25 into 4.7-stable Oct 1, 2026
33 of 35 checks passed
@pawicao
pawicao deleted the @pawicao/4.7-stable/cherry-pick-#10642 branch October 1, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants