Skip to content

Derive changelog PR links from the squash commit - #8888

Merged
cknitt merged 2 commits into
masterfrom
changelog-derived-pr-links
Oct 18, 2026
Merged

cknitt merged 2 commits into
masterfrom
changelog-derived-pr-links

Conversation

@cknitt

@cknitt cknitt commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Changelog fragments no longer contain PR links. A fragment is just the entry:

- Recover blocked dependents after a failed build.

yarn changelog:release adds each link itself, from the squash commit that merged the fragment (… (#8667)). New PRs no longer need the draft with the pull/XXXX placeholder, and the amend once the number is known.

  • scripts/changelog.js:
    • A bullet may end without a link. A bullet that does end with links keeps them as written, e.g. for an entry spanning several PRs.
    • At release, each linkless bullet gets the link of the PR whose commit added the fragment. Entries are still ordered newest PR first. In a preview, fragments not merged yet come first.
    • The release refuses, naming the fragment, if that commit's subject has no (#N). It writes nothing in that case.
    • The check that runs on each push to master traces every linkless fragment to its PR, so a merge without (#N) fails right after it lands rather than at release time.
  • changes/README.md and AGENTS.md: the placeholder steps are replaced by the squash-merge rule.

Repository settings

This relies on PRs being squash-merged with the (#N) GitHub adds to the title. The repository now allows only squash merges, titled with the PR title and (#N) ("Default to pull request title and commit details"). Since v13.0.0-alpha.6, 128 of 131 commits on master were squash merges. The other 3 were rebase merges (#8870, #8669) and carry no PR number.

Checked against history

I stripped the links from every fragment on master and derived them again. 46 of 47 fragments got exactly their original links back, and the release produces an identical CHANGELOG.md. The one miss is commit-records.internal.md, from the rebase-merged #8870; the release refuses it as described above. This PR's own fragment has no link, so it resolves once this PR is squash-merged.

Tests

scripts/changelog.test.js:

  • linking per bullet, including continuation lines and fragments mixing linked and linkless bullets;
  • a release that refuses without changing any files, then succeeds;
  • ordering of linkless fragments in previews;
  • the lookup in a throwaway repository: a squash subject, a subject without a number, and a later edit by another PR, which does not change who added the fragment.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NP47qMfjMbjUTKZDsLthDo

Fragments no longer need a PR link, so new PRs don't need the placeholder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NP47qMfjMbjUTKZDsLthDo
Signed-off-by: Christoph Knittel <ck@cca.io>
@pkg-pr-new

pkg-pr-new Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8888

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8888

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8888

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8888

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8888

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8888

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8888

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8888

commit: 73d89ca

@cknitt
cknitt requested a review from fhammerschmidt October 18, 2026 06:25
@github-actions

Copy link
Copy Markdown

@cknitt

cknitt commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T06:45:13.973766Z 73d89ca Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcc6488fff

ℹ️ 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".

Comment thread scripts/changelog.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NP47qMfjMbjUTKZDsLthDo
Signed-off-by: Christoph Knittel <ck@cca.io>
@cknitt

cknitt commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@github-actions

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 73d89ca3d5

ℹ️ 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".

@cknitt
cknitt enabled auto-merge (squash) October 18, 2026 06:58
@cknitt
cknitt merged commit 9946def into master Oct 18, 2026
30 checks passed
@cknitt
cknitt deleted the changelog-derived-pr-links branch October 18, 2026 07:25
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