-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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(release notes): Show release notes from monorepo #12543
feat(release notes): Show release notes from monorepo #12543
Conversation
related issue #10954 |
@sergVedmak thanks for digging into this problem! Can you answer me one question: If there are two packages from the same monorepo, and with different |
Yes, both duplicated release notes will be displayed. I will try to find a new solution for this case and update the pull request |
I ended up with a new solution and updated the request description. There are a description of the work of the new deduplication logic and screenshots with examples |
@rarkins can you check my changes? (I can't re-request review) |
@sergVedmak I will review the code soon, thanks. Can you also describe what changes you found necessary or not necessary to make with changelog caching as a result of these changes? |
I'm not sure if I understood the question correctly. I don't think that my changes in cache keys must be in changelog(release notes) One thing: new logic for de-duplicate with |
So, we still need to check:
|
|
In that case we should bump the cache key version so that existing cached notes get expired and new ones fetched and set with the new key |
can you help me to find the place, where I need to bump the cache key version? |
I added an example but currently on mobile so may have missed others which need to be changed too |
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Thanks, I have updated one more key |
is there any news about this? |
@viceice can you check my answers to your comments, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me, but has this final version been tested e2e in real repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, LGTM. Please do some new e2e tests.
@sergVedmak please let us know once you're confident to merge, thanks |
I created two repo with same dependencies sergVedmak/emotion-renovate#1 - PR from Renovate Github App (current behavior). Release notes shown only for first dependency sergVedmak/emotion-renovate-2#2 - PR from local running renovate with final version of this changes . Each dependency has its own release notes |
Is the test from the previous comment enough? or do I need to check something else? |
Thanks @sergVedmak for a really great PR |
🎉 This PR is included in version 29.30.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes:
fix few cache key
UPD 11.11.2021
change summary of release notes collapsible section fromrepoName
todepName
UPD 11.11.2021 change summary of release notes collapsible section from
repoName
torepoName (depName)
, only if pull request updates several dependencies and some dependencies have the same repoNameUPD 11.11.2021 change logic to deduplicate release notes
current logic: Iterate over each dependency update in pull request and compare repo source url. If there is another update with the same repo source url, hide the release notes
new logic: Each dependency update has releases with releaseNotes. When the release notes are in the process of being received, I save source of release notes in
notesSourceUrl
field. It can be link to changelog.md file or gihub/gitlab release api, without specifying a specific version. Then, iterate over each dependency update, getnotesSourceUrl
from first release notes and check that there is no another dependency with samenotesSourceUrl
.Examples:
Update react, react-is, renovate in one pull request. react and react-is sources are located in monorepo, have different
sourceDirectory
in package.json and have same changelog source. Deduplicate release notesUpdate our private packages. They are located in monorepo, have different
sourceDirectory
in package.json and have different changelog.md. Do not deduplicate release notes and add depName to summary of collapsible sectionContext:
First problem: If there are two packages and they are located in the monorepo, only the first package will receive the update notes. Changes in cache keys fix this problem.
Second problem: Release notes are shown via collapsible section. Summary of this section is repository name. If we group two packages from monorepo in one merge request, will appear two collapsible sections with same summary.
Documentation
How I've tested my work
I have verified these changes via: