Skip to content

Consolidate unreleased formatter bumps in changelog updater - #3137

Closed
nedtwigg wants to merge 1 commit into
mainfrom
fix/consolidate-renovate-changelogs
Closed

nedtwigg wants to merge 1 commit into
mainfrom
fix/consolidate-renovate-changelogs

Conversation

@nedtwigg

@nedtwigg nedtwigg commented Oct 8, 2026

Copy link
Copy Markdown
Member

The Renovate changelog updater currently appends each formatter bump as a separate entry and reintroduces duplicates after manual consolidation, as happened in #3132.

Consolidate generated bumps for the same formatter within Unreleased / Changes: retain the original starting version, use the current catalog version as the target, and preserve all distinct PR links in order. Repeated runs preserve the consolidated entry and repair existing duplicates. Released entries, other sections, and explanatory notes remain intact.

Add 13 regression tests, including a CLI test covering all three changelogs and merge-base comparison. Run these tests in the changelog workflow before updating files, and trigger the workflow when its script, tests, or configuration changes.

Validation: all 13 tests, actionlint, and ./gradlew spotlessCheck passed. Also replayed the real changelog contents before and after 7742abc and after the bot's follow-up commit; all three changelogs exactly match the manual consolidation.

@nedtwigg
nedtwigg marked this pull request as ready for review October 8, 2026 20:55
@nedtwigg
nedtwigg requested a review from edgartwigg as a code owner October 8, 2026 20:55
@nedtwigg
nedtwigg requested a review from Goooler October 8, 2026 20:56
@Goooler

Goooler commented Oct 8, 2026

Copy link
Copy Markdown
Member

It's a bit annoying to my side. The current implementation could detect all actual version changes from HEAD, I don't think we need to note all the changed steps in the items (which lists them like (num 1, num 2, num 3, num 4)).

@nedtwigg

nedtwigg commented Oct 8, 2026 •

Copy link
Copy Markdown
Member Author

The problem before (I think, maybe I misunderstand) was that we were getting multiple changelog entries for the same lib:

- Bump default `palantir-java-format` version `2.98.0` -> `2.99.0`. ([#3103](https://github.com/diffplug/spotless/pull/3103))
- Bump default `palantir-java-format` version `2.99.0` -> `2.102.0`. ([#3132](https://github.com/diffplug/spotless/pull/3132))

Whereas now they get compressed into just one

- Bump default `palantir-java-format` version `2.98.0` -> `2.102.0`. ([#3103](https://github.com/diffplug/spotless/pull/3103), [#3132](https://github.com/diffplug/spotless/pull/3132))

Does that make sense? Maybe I misunderstand how we ended up with multiple entries for the same lib before...

@Goooler

Goooler commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Accroding to the timeline of #3132, I noticed 2083664 has been sent due to 7742abc, we don't have to update the changelog items manually in most cases.

@nedtwigg

nedtwigg commented Oct 8, 2026

Copy link
Copy Markdown
Member Author

Okay. I'll close this for now, and I can always reopen if we change our mind.

Usually I don't merge renovate PRs until the last minute, right before a release. But sometimes the release gets dragged-out (as in this case) and it would be nice to not need to muck with the changelog for the case where a given dependency gets updated twice in one release cycle.

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.

3 participants