You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected & undesriable CHANGELOG results when prerelease then release #555
I have two CI/CD jobs: one for prerelease that is executed on branches != main and one for (final) release, which is executed when merging to main.
If you create a prerelease from a branch, CHANGELOG.md will be updated, creating a new section with the prerelease version (e.g. x.x.xrc1)
Then, when the release is created, a new section is created for it in the CHANGELOG (e.g. x.x.x), but this section is empty.
Either I'm doing something wrong or the CHANGELOG interaction when prereleasing wasn't taken into account.
Expected
The optimal would be deleting the prerelease section in the CHANGELOG and creating a new section for the release with the changes made since the last release on it.
@claverru finally had a chance to roll back round to this - I don't think there's a way to avoid this in v7, because of the way new content is inserted to the changelog - once you merge the commits from a branch to main, they're "already released" in the prerelease version, so there's nothing "new" to add under the release you then create from main. I think that's desired behaviour anyway - there's no change over the prerelease version.
I think I get what you're after, though - some way to aggregate all the changelog entries into the section under the release, eliminating the entries for the prereleases. You should be able to do this with a template in v8, although if you squash and merge the branch then the changelog will be regenerated with just that merge commit under the new version on main
I realized this was intended when I read your release notes here in github. It's just weird that, and the end of the day, I have only notes on prereleases but not on releases, because every mapping change (fix, feat, etc) is first built as a prerelease.
I will have a look to these templates, didn't have the chance to investigate what they are for.
Also, thank you so much for answering me in every issue @bernardcooke53 . I feel like spamming.
It's a bit of a strange one to adjust to - definitely in v7 we're a bit pinned down to just extracting the information from the commits, we can't/don't regenerate the changelog entirely.
I noticed a pretty significant trend with PRs along the lines of "allow x customisation in changelogs, add x config setting and an if config.get(x) statement", which is a pretty slow cycle and adds up to messy/competing logic over time. Introducing templating means you don't need to go through any of that to adjust the changelog, you can do it in your own project
Template-wise, my idea here would be to render the headings only if the version isn't a prerelease version, so the commits would only appear under the release version.
I'm expecting over time there might be some feature requests for new pieces of context to enable bits of customisation, but honestly you can get pretty far with what's already there (in my opinion, biased for sure).
Spam away @claverru - I try and get back to issues as soon as I reasonably can, and if you weren't asking the questions I'm sure someone else would sooner or later. Really appreciate all the feedback and time you've put into figuring things out too 🏅
I'm working on a lot of changes related to the changelogs although it has recently come to my attention with #789, you may be experiencing issues due to an algorithm bug.
I hope to finish these updates in the next few weeks and I will see if I can address this in my efforts.
It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
It has been 90 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
It has been 90 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
It has been 90 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
Activity
bernardcooke53 commentedon Feb 17, 2023
Hey 👋
Which commands are you running on each branch, and what does your configuration look like? Is it the same configuraiton for each?
claverru commentedon Feb 20, 2023
@bernardcooke53
prerelease:
semantic-release publish --prerelease -D branch=$CI_COMMIT_BRANCH -D prerelease_tag=rcrelease:
semantic-release publish -D prerelease_tag=rcrelease conf (only for release not prerelease):
claverru commentedon Jun 13, 2023
@bernardcooke53 any updates on this?
bernardcooke53 commentedon Jun 22, 2023
@claverru finally had a chance to roll back round to this - I don't think there's a way to avoid this in v7, because of the way new content is inserted to the changelog - once you merge the commits from a branch to main, they're "already released" in the prerelease version, so there's nothing "new" to add under the release you then create from main. I think that's desired behaviour anyway - there's no change over the prerelease version.
I think I get what you're after, though - some way to aggregate all the changelog entries into the section under the release, eliminating the entries for the prereleases. You should be able to do this with a template in v8, although if you squash and merge the branch then the changelog will be regenerated with just that merge commit under the new version on main
claverru commentedon Jun 26, 2023
I realized this was intended when I read your release notes here in github. It's just weird that, and the end of the day, I have only notes on prereleases but not on releases, because every mapping change (fix, feat, etc) is first built as a prerelease.
I will have a look to these templates, didn't have the chance to investigate what they are for.
Also, thank you so much for answering me in every issue @bernardcooke53 . I feel like spamming.
bernardcooke53 commentedon Jun 27, 2023
It's a bit of a strange one to adjust to - definitely in v7 we're a bit pinned down to just extracting the information from the commits, we can't/don't regenerate the changelog entirely.
I noticed a pretty significant trend with PRs along the lines of "allow x customisation in changelogs, add x config setting and an
if config.get(x)statement", which is a pretty slow cycle and adds up to messy/competing logic over time. Introducing templating means you don't need to go through any of that to adjust the changelog, you can do it in your own projectTemplate-wise, my idea here would be to render the headings only if the version isn't a prerelease version, so the commits would only appear under the release version.
I'm expecting over time there might be some feature requests for new pieces of context to enable bits of customisation, but honestly you can get pretty far with what's already there (in my opinion, biased for sure).
Spam away @claverru - I try and get back to issues as soon as I reasonably can, and if you weren't asking the questions I'm sure someone else would sooner or later. Really appreciate all the feedback and time you've put into figuring things out too 🏅
cc-stjm commentedon Jan 9, 2024
I'd be interested in this feature too - if doing it in templates is the correct way to do it, could we have a demo?
I do worry that there could be git merge histories where it could result in a commit being in the wrong release - e.g.
How do we ensure that the features that appear in v1.0.1-rc1 are listed in v1.0.2 not v1.0.1?
codejedi365 commentedon Jan 11, 2024
@cc-stjm, are you also using v7?
I'm working on a lot of changes related to the changelogs although it has recently come to my attention with #789, you may be experiencing issues due to an algorithm bug.
I hope to finish these updates in the next few weeks and I will see if I can address this in my efforts.
cc-stjm commentedon Jan 11, 2024
I was using python-semantic-release 8.7.0
cc-stjm commentedon Apr 11, 2024
@codejedi365 you mentioned you were looking at some updates in this area, did you finish that work?
32 remaining items
github-actions commentedon Jun 17, 2025
It has been 60 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
codejedi365 commentedon Jun 18, 2025
No update, still in backlog
github-actions commentedon Sep 17, 2025
It has been 90 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
codejedi365 commentedon Sep 23, 2025
Still in backlog
github-actions commentedon Dec 23, 2025
It has been 90 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?
github-actions commentedon Jul 5, 2026
It has been 90 days since the last update on this confirmed issue. @python-semantic-release/team can you provide an update on the status of this issue?