Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changelog entries for fixups with main PR #15207

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

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)

scripts/github-changelog.cr Outdated Show resolved Hide resolved
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

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