-
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
How to get release notes from CHANGELOG? #4724
Comments
We do support changelog files, but there's a number of things that could possibly be going wrong. Please answer the following: What type of dependency is it? e.g. npm? |
npm
self-hosted. we configured everything needed to pull from our private registry already in the renovate.json file
yes
CHANGELOG.md
conventional commits |
@rarkins see the update above, the package.json file doesn't reference the repo (it's a monorepo btw) |
So in that case Renovate has no sourceUrl to know where to look. Are you using a shared CHANGELOG.mde in the root of the monorepo or one changelog per package? |
A CHANGELOG per package. What should I put in that package's package.json file to make it pick up the release notes from the CHANGELOG.md file? |
Follow the npm docs here: https://docs.npmjs.com/files/package.json#repository Specifically: |
thanks @rarkins, will try. so, with all that in place, Renovate should be able to generate PR release notes using the CHANGELOG.md file in the repository, right? |
In theory yes, although nested changelog retrieval is definitely not something I've extensively tested. At the very least we're ready for testing and reproducing any bugs |
Hi @rarkins. We tried it out and now we get a Release Notes section in the PRs for the package, so it's a step forward! Unfortunately though, we don't get the list of changes. Here's what it looks like: The CHANGELOG.md file contains changes in the form generated by conventional changelog. Here's the top of that file (sensitive data redacted):
|
Can you give an example of what you’re expecting instead? |
I would expect the list of changes as described in the changelog |
This comment has been minimized.
This comment has been minimized.
Sorry, I misunderstood the part you had pasted in previously. I thought the changelog markdown content you added was already in the PR, and you were expecting more (a list of commits, etc). I deleted my comment and minimized yours. What you're seeing implies that Renovate is not actually detecting the Changelog.md in the source repository. It looks like it's detecting the tags in the source repo and linking accordingly (please confirm that the 0.10.2 link in your screenshot links to the correct location). |
It's alright, thanks for your support. The link in the screenshot links to Without that, no |
Hi @rarkins, I'm posting an update because the appearance of the release notes unfortunately seems to have been triggered by us publishing a Release to GitHub, and indeed the Changelog file doesn't seem to be picked up. We were trying several things and at some point we published a release. For the next version bump we didn't publish the release and the release notes in the Renovate PR have disappeared again, meaning that indeed it's not picking up the Changelog. Other ideas? |
We might only be able to solve this after reproducing it publicly so that it can be debugged from the CLI. Before then though, it might be easier for you to reproduce it internally and share the logs. Can you do this?
|
Hi @rarkins, thanks for your support so far. Here's a repro on a public repository.
whereas it would say
if Renovate was picking them up from the nested package's changelog file. I hope this helps troubleshoot the issue |
Thanks for reproducing it. I have now moved it into the main repo as it seems we need code changes and not config changes. I think the logic error occurs in here: renovate/lib/workers/pr/changelog/release-notes.js Lines 141 to 158 in abe166e
It needs to be adapted to consider the sourceDirectory first, if present. |
Thanks for looking into this @rarkins. From what I see in the code nested changelog files don't seem to be supported. I've set up renovate locally to see if I could contribute an improvement, but it looks like this would be an entirely new feature, and I'm not sure how to go about it. The function you linked to above probably needs to be modified quite a bit to account for nested packages, so it would have to have knowledge of monorepos and the specific package manager. I am easily missing something as I'm not familiar with the Renovate codebase, but a straightforward implementation would require to look into the specific package we're trying to bump, read its |
@simoneb I was hoping that there would be a variable |
@simoneb are you using |
If the change log is only in the published npm package will renovate discover this and use it for the release notes, or does it reach out to the source repository and extract it from there? In my scenario, the CHANGELOG is not sourced, and only exists in each package distribution on the registry. |
Only the source repo. We don't download/extract artifacts from registries |
Could you take a look at this PR: I do not understand why the release notes are not loaded. I recently added |
Could documentation be added about where renovatebot looks for changelogs in monorepos? We're trying to get detection working with https://github.com/snowpackjs/astro/ and I was hoping just specifying the source URL would fix things. |
Renovate should follow the convention described here for monorepos: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository e.g. {
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
}
} If it's still not working, please create a simply reproduction repo upgrading one of your monorepo packages (and failing to show the release notes) and we can take a look and fix things if necessary. |
Sure thing! I did that, but it's still not working: https://github.com/jasikpark/my-astro-project/pull/7
|
FYI I have reproduced this problem using your project and have a fix in progress |
Isn't this fixed ? |
Which Renovate are you using? CLI, App, or Pro
App
Which platform are you using? GitHub, GitLab, Bitbucket Azure DevOps
GitHub
What is your question?
We're publishing some packages which are used by our applications and as part of an improvement of the package publishing process we're now generating and including a CHANGELOG file in the package.
We thought that this would be enough to get the Release Notes section to show in the PRs created by Renovate but it turns out it's not the case. Checking other packages I realized that the release notes are probably coming from GitHub's releases page instead.
Is there a reason why the CHANGELOG file isn't used instead? I feel it would make more sense for release notes to come from a file within the package rather than the platform where the source code of the package is hosted.
The text was updated successfully, but these errors were encountered: