Repository navigation
Add changelog fragments - #8755
Conversation
Signed-off-by: Christoph Knittel <ck@cca.io>
Move the check to its own workflow, exempt Dependabot, insert notes newest PR first without splitting lists, and refuse to publish with leftover fragments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
Reject CHANGELOG.md edits without changelog:release, explain the placeholder link and draft PR flow, and open the next unreleased section by command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
It was used once, in 10.1.0-rc.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
Yarn always packs a root changelog directory, which would ship fragments in the npm package and break the artifact list check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Christoph Knittel <ck@cca.io>
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8755 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d91af0f1a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Publish blocks on fragments merged after release preparation; rerunning changelog:release now adds them instead of failing on the finalized heading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XJG88tCTovUPzEf2nxUPtq Signed-off-by: Christoph Knittel <ck@cca.io>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09f63877d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Publish tags vX before publishing, so a tagged version is treated as published and its notes are no longer extended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XJG88tCTovUPzEf2nxUPtq Signed-off-by: Christoph Knittel <ck@cca.io>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 344c25857b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XJG88tCTovUPzEf2nxUPtq Signed-off-by: Christoph Knittel <ck@cca.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8755 +/- ##
==========================================
+ Coverage 80.01% 80.40% +0.39%
==========================================
Files 466 447 -19
Lines 63554 60984 -2570
==========================================
- Hits 50854 49036 -1818
+ Misses 12700 11948 -752 🚀 New features to boost your workflow:
|
Motivation
Today every user-facing PR adds a line directly to the
(Unreleased)section ofCHANGELOG.md. Because all those lines go into the same few sections, concurrent PRs constantly conflict on the changelog. That means rebasing only to resolve changelog conflicts, which is especially painful with stacked PRs. An entry can also end up in the wrong section, or under a version that has already been released, if the PR was opened before a release and merged after it. Nothing checks that a PR has an entry at all, and finalizing the changelog for a release is a manual edit.Change
Release notes move into per-PR fragment files that never conflict, and they are collected into
CHANGELOG.mdonly at release time.How it works
Each user-facing change adds
changes/<description>.<category>.md(notchangelog/, which yarn always packs into the npm package) with Markdown bullets that end in PR links. The categories are the existingCHANGELOG.mdsections:breaking,feature,fix,docs,polish,internal. The unused Spec Compliance section is dropped; its only entry was in 10.1.0-rc.1. Seechanges/README.md.For example,
changes/fix-watch-lock-removal.fix.md:A fragment can hold several bullets of the same category. A bullet can wrap onto lines indented by two spaces and end with more than one PR link, as in
changes/remove-deprecated-attributes.breaking.md:The PR number isn't known before the PR exists, so open it as a draft with the placeholder link
https://github.com/rescript-lang/rescript/pull/XXXX, then replace it and mark the PR ready. Until then the check fails with:A new
Changelogworkflow validates all fragments. On PRs, it also requires a newly added fragment and rejects edits toCHANGELOG.md.The workflow is separate from the main CI, so label changes rerun only this check.
Release flow:
yarn changelog:previewshows pending notes.yarn changelog:releaseinserts fragments into the unreleased section (newest PR first, existing entries kept), removes "(Unreleased)", and deletes the fragments.yarn changelog:openadds the next empty unreleased section after the version bump.For example, with the fragment above and one existing entry,
yarn changelog:releaseturnsinto
and deletes
changes/fix-watch-lock-removal.fix.md.The Publish workflow refuses to release while fragments remain, so changes merged after release preparation can't ship without notes.
CONTRIBUTING.md,AGENTS.mdand a new PR template checklist document all this.Alternatives considered
CHANGELOG.md).yarn constraints.All of these would still need custom glue for the label-based PR check, the
CHANGELOG.mdguard, the Publish guard and our existing format. The custom script is about 200 lines with tests and no dependencies, and it keeps today'sCHANGELOG.mdformat.Labels (maintainer-applied, must exist in the repo)
changelog:skip: no release notes needed. The fragment requirement is waived, but any fragment present is still validated.changelog:release: release preparation and opening the next section. It's the only label that allows editingCHANGELOG.md.After merging
CHANGELOG.mdneed to move their entry into a fragment.CHANGELOG.mdstay as they are and are released with the next version.Tests
scripts/changelog.test.jscovers:$patternsscripts/releasePlan.test.jsadds a test for the leftover-fragment guard.yarn test-release-plannow runs in CI; nothing ran it before.This PR removes the empty Spec Compliance heading from
CHANGELOG.md, so it needs thechangelog:releaselabel rather thanchangelog:skip.🤖 Generated with Claude Code