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

feat(changelog): improve release detection #25050

Merged
merged 10 commits into from
Oct 16, 2023

Conversation

phyzical
Copy link
Contributor

@phyzical phyzical commented Oct 5, 2023

Changes

ran into a bug where if we have a pinned version that does not exist then it skips over checking for changelogs.

i.e pinning to 1.2.3 but only 1.2.4, 1.2.2 exists

Noticed there is a chunk of code here https://github.com/renovatebot/renovate/blob/main/lib/workers/repository/update/pr/changelog/source.ts#L101 that enforces two releases minimum, due to how it extracts changelog diffs between two versions.

This pr just adds logic to try and best guess what the last version should have been so that changelogs still work as expected, or rather there will be 2 releases to perform the changelog

see phyzical/renovate-tester#10 for an example where it is working with these changes.

Or rather goodwithtech/dockle@v0.4.11...v0.4.13 you can see that is has produced a diff via 0.4.11 -> 0.4.13 even though its pinned to 0.4.12

and see #25043 for more information of my debugging

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins requested a review from zharinov October 5, 2023 08:19
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
phyzical and others added 3 commits October 10, 2023 08:24
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
…ses.spec.ts.snap

Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
viceice
viceice previously approved these changes Oct 16, 2023
@viceice
Copy link
Member

viceice commented Oct 16, 2023

needs prettier run

@viceice viceice changed the title feat: improve changelog release detection feat(changelog): improve release detection Oct 16, 2023
@viceice viceice added this pull request to the merge queue Oct 16, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 16, 2023
@viceice viceice added this pull request to the merge queue Oct 16, 2023
Merged via the queue into renovatebot:main with commit 97f3f0d Oct 16, 2023
34 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

jon4hz pushed a commit to jon4hz/renovate that referenced this pull request Nov 9, 2023
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants