Repository navigation
Changelog version has hardcoded 'v' as prefix even with tag_format = "{version}" #1186
Description
Activity
- addedbugSomething isn't working properlySomething isn't working properlytriagewaiting for initial maintainer reviewwaiting for initial maintainer review
on Feb 14, 2025 This is the expected result. Although there is a previous issue and the previous maintainer decided to use the tag format instead. I do not share the same opinion.
The tag format construct is designed for monorepo usage where you have multiple of the same versions but to differentiate you need a different prefix. When you have a monorepo you have multiple changelogs and at that point the prefix is not relevant to the individual modules changelog because the module is a specific semver version. Then separately I believe it looks much better with the
vprefix than not in the changelog.Unlike before, now there is fully customizable changelog templates so my recommendation is to configure custom templates and change the version string to what you desire. Instead you can change it to
release.version.as_tag()and it will apply your tag format.- addedawaiting-replyWaiting for responseWaiting for responseand removedbugSomething isn't working properlySomething isn't working properlytriagewaiting for initial maintainer reviewwaiting for initial maintainer review
on Feb 14, 2025 This is the expected result. Although there is a previous issue and the previous maintainer decided to use the tag format instead. I do not share the same opinion.
The tag format construct is designed for monorepo usage where you have multiple of the same versions but to differentiate you need a different prefix. When you have a monorepo you have multiple changelogs and at that point the prefix is not relevant to the individual modules changelog because the module is a specific semver version. Then separately I believe it looks much better with the
vprefix than not in the changelog.Unlike before, now there is fully customizable changelog templates so my recommendation is to configure custom templates and change the version string to what you desire. Instead you can change it to
release.version.as_tag()and it will apply your tag format.Thank you for letting me know this is an expected behavior and the work around. I know this makes sense from monorepo perspective, but I guess people who don't manage monorepo like me would easily expect the other way around.
To only change this prefix by introducing a whole directory of customized template is a bit overkill for this...(I guess it depends on how irritating this would be), I'm ok to comply.
But it would be really great to have a changelog configversion_format=as_semver|as_tagto easily switch this around. Let me know if you think this is a good idea, I can help to contribute this.- addedtriagewaiting for initial maintainer reviewwaiting for initial maintainer reviewand removedawaiting-replyWaiting for responseWaiting for response
on Feb 17, 2025 I know this makes sense from monorepo perspective, but I guess people who don't manage monorepo like me would easily expect the other way around.
Can't say I expected people to remove the
vor use tag format for this purpose but yes I see how it could look like that after the fact.To only change this prefix by introducing a whole directory of customized template is a bit overkill for this
Just note that this line of thinking is a slippery slope for a maintainer as it introduces another variation that I must maintain over the long term. I must consider each variation independently.
But it would be really great to have a changelog config
version_format=as_semver|as_tagto easily switch this around. Let me know if you think this is a good idea, I can help to contribute this.I've considered that it is reasonable to add an configurable option to the default changelog, and would like to add a toggle with the option:
semantic_release.changelog.default_templates.use_tag_format = true | falseWill need to add an E2E test which is most easily accomplished for the repo fixtures that already modify the tag format but the internal changelog generator will need a modification.
Reacted by Drew Yang- addedfeatureA new feature or a feature requestA new feature or a feature requestconfirmedPrevent from becoming stalePrevent from becoming staleand removedtriagewaiting for initial maintainer reviewwaiting for initial maintainer review
on Feb 19, 2025 - addedneeds-updateNeeds status update from maintainersNeeds status update from maintainers
on Apr 20, 2025 In development but has not been completed yet.
- removedneeds-updateNeeds status update from maintainersNeeds status update from maintainers
on Apr 23, 2025 - addedneeds-updateNeeds status update from maintainersNeeds status update from maintainersand removedneeds-updateNeeds status update from maintainersNeeds status update from maintainers
on Jun 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?
- addedneeds-updateNeeds status update from maintainersNeeds status update from maintainers
on Sep 26, 2025 Still in backlog
- removedneeds-updateNeeds status update from maintainersNeeds status update from maintainers
on Oct 2, 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?
- addedneeds-updateNeeds status update from maintainersNeeds status update from maintainers
on Feb 9, 2026
Bug Report
Description
With configuration
tag_format = "{version}"instead of the defaulttag_format = "v{version}", changelog is still been generated withvX.X.Xinstead ofX.X.XI have found a previous issue had been fixed for the exactly same problem #561 but the code has been refactored since then, and this exactly same issue might be implemented again at here:
python-semantic-release/src/semantic_release/version/version.py
Lines 209 to 210 in eccdb59
If I understand this correctly, the changelog template revokes this function here with the hardcoded:
python-semantic-release/config/release-templates/.components/versioned_changes.md.j2
Line 11 in eccdb59
Expected behavior
When
tag_format = "{version}", the changelog's version should format in the same way as{version}.Actual behavior
When
tag_format = "{version}", the changelog's version unexpectedly formats asv{version}.Environment
pip freezegit log --oneline --decorate --graph --all -n 50Configuration
Semantic Release Configuration
Build System Configuration
GitHub Actions Job Definition
Execution Log
semantic-release -c ./.semantic-release.toml -v changelogAdditional context