diff --git a/CHANGELOG.md b/CHANGELOG.md index ea6f4b69..69dab893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,6 @@ * Add rbs to `go_gem` gem by @sue445 in https://github.com/ruby-go-gem/go-gem-wrapper/pull/215 * Add rake task helper for go by @sue445 in https://github.com/ruby-go-gem/go-gem-wrapper/pull/214 -### Other changes - ## ruby_h_to_go * No changes @@ -19,8 +17,6 @@ ### Bugfixes * Fix changelog_generator on CI by @sue445 in https://github.com/ruby-go-gem/go-gem-wrapper/pull/212 -### Other changes - **Full Changelog**: https://github.com/ruby-go-gem/go-gem-wrapper/compare/v0.2.4...v0.3.0 # [v0.2.4](https://github.com/ruby-go-gem/go-gem-wrapper/releases/tag/v0.2.4) - 2024-11-16 diff --git a/_tools/changelog_generator/changelog_generator.rb b/_tools/changelog_generator/changelog_generator.rb index 2501028d..52059afe 100644 --- a/_tools/changelog_generator/changelog_generator.rb +++ b/_tools/changelog_generator/changelog_generator.rb @@ -100,12 +100,14 @@ def generate_category_changelog(prs) # rubocop:disable Metrics/AbcSize,Metrics/C found_pr_numbers.include?(pr["number"]) || pr["label_names"].include?("chore") end - lines << "### Other changes" - other_prs.each do |pr| - lines << generate_changelog_line(pr) + unless other_prs.empty? + lines << "### Other changes" + other_prs.each do |pr| + lines << generate_changelog_line(pr) + end + found_pr_numbers.push(*other_prs.map { |pr| pr["number"] }) + lines << "" end - found_pr_numbers.push(*other_prs.map { |pr| pr["number"] }) - lines << "" return "* No changes\n\n" if found_pr_numbers.empty?