Skip to content

Merge changelog entries for fixups with main PR#15207

Merged
straight-shoota merged 6 commits intocrystal-lang:masterfrom
straight-shoota:infra/changelog-fixup
Dec 4, 2024
Merged

Merge changelog entries for fixups with main PR#15207
straight-shoota merged 6 commits intocrystal-lang:masterfrom
straight-shoota:infra/changelog-fixup

Conversation

@straight-shoota
Copy link
Member

The release changelog directly maps all merged PRs to changelog entries. Some PRs are bugfixes or enhancements to other changes. They're less relevant for users because they only affect an intermediary state in the release process. For example, #15178 fixes a regression, but that regression is only in master.
The changelog describes the difference between two releases. So a reader wouldn't even consider this a regression fix because the code that introduced the bug was never released on its own without the fix.

From the perspective of the changelog it makes sense to group related PRs that build on top of each other into a single changelog entry. We had been doing this already previously, when we were writing the changelog manually.

This patch adds support for this to the changelog generator. If a PR title contains the text [fixup #XXXX] (where #XXXX references a PR), its entry gets merged with the referenced PR. The title and labels of the fixup are ignored, only the PR number and author show up in the changelog.

Example diff that this change would produce in the changelog for 1.15:

-- *(interpreter)* setup signal handlers in interpreted code ([#14766], thanks @ysbaddaden)
-- Add compiler versions constraints for interpreter signal handler [fixup #14766] ([#15178], @straight-shoota)
+- *(interpreter)* setup signal handlers in interpreted code ([#14766], [#15178], thanks @ysbaddaden, @straight-shoota)

Comment on lines +363 to +367
authors = [] of String
pull_requests.each do |pr|
author = pr.author || next
authors << author unless authors.includes?(author)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Could be simplified by using Set.

Suggested change
authors = [] of String
pull_requests.each do |pr|
author = pr.author || next
authors << author unless authors.includes?(author)
end
authors = Set(String).new
pull_requests.each do |pr|
authors << pr.author || next
end

@straight-shoota straight-shoota added this to the 1.15.0 milestone Dec 3, 2024
@straight-shoota straight-shoota merged commit bf0a586 into crystal-lang:master Dec 4, 2024
@straight-shoota straight-shoota deleted the infra/changelog-fixup branch December 4, 2024 12:56
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.

3 participants