Skip to content

Add typeshed diff link to changelog during release#2957

Merged
AlexWaygood merged 2 commits intomainfrom
claude/automate-changelog-fixup-4iMy2
Mar 4, 2026
Merged

Add typeshed diff link to changelog during release#2957
AlexWaygood merged 2 commits intomainfrom
claude/automate-changelog-fixup-4iMy2

Conversation

@AlexWaygood
Copy link
Member

Summary

Automatically generate and append a typeshed diff link to the changelog when the vendored typeshed source commit changes during a release.

The script now:

  1. Captures the current typeshed source commit before updating Ruff
  2. After running the release process, checks if the typeshed commit has changed
  3. If it has changed and the changelog mentions a typeshed sync, appends a link to the GitHub diff showing what changed in typeshed

Test Plan

No idea. I tried mucking around locally to fool the release script and/or rooster into thinking that we were doing a release that updated typeshed, but to no avail. I guess we just have to wait until we cut a release that includes a typeshed sync to see if this actually worked or not?

claude added 2 commits March 4, 2026 11:21
Before updating the ruff submodule, save the current typeshed source
commit from `ruff/crates/ty_vendored/vendor/typeshed/source_commit.txt`.
After rooster generates the changelog, if the typeshed commit changed,
automatically append a `[Typeshed diff](...)` link to any
"Sync vendored typeshed stubs" changelog entries. This removes the need
for manual PR suggestions to add the link on every release.

https://claude.ai/code/session_014HpqW7xbo81UrgXcFWrR7f
`sed -i` requires a backup extension argument on macOS (BSD sed) but
not on Linux (GNU sed). Using a temp file + mv avoids this entirely.

https://claude.ai/code/session_014HpqW7xbo81UrgXcFWrR7f
@AlexWaygood AlexWaygood added the release Related to the release process label Mar 4, 2026
Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Thank you! Looks reasonable, guess we'll see if it works :)

@AlexWaygood AlexWaygood merged commit 065338a into main Mar 4, 2026
13 checks passed
@AlexWaygood AlexWaygood deleted the claude/automate-changelog-fixup-4iMy2 branch March 4, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Related to the release process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants