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
After creating a dev release I cannot create any release (dev or regular). The issue can be resolved if I remove the dev release from the changelog.
Also based on the documentation one would expect X.Y.devN version to work, but that is not the case.
Steps to reproduce
Create a dev release by running: cz bump --devrelease 1
Changelog now contains entry for this dev release
Create a regular release by running: cz bump
Current behavior
Error message:
change: Update version to 4.8.0
tag to create: v4.8.0
increment detected: MINOR
No tag found to do an incremental changelog
Seems like the only issue here is the changelog parsing.
Desired behavior
Commitizen should be able to parse the changelog and create a new release. Remove the dev release from the changelog and add changes to the new release.
Do you have any updates for this? The issue (not sure if the only one) seems to be in using the SequenceMatcher to match the version. This evaluates that version 1.1.0 is closer to 1.2.0 than 1.2.0.dev1, which is not correct and ends with No tag found to do an incremental changelog error. This is really frustrating and means we cannot use Commitizen for dev releases as it is completely broken.
Adding type: bug based on the round-2 triage in #1965. The reporter''s own diagnosis matches what I see in master:
commitizen/commands/changelog.py:131-161 (_find_incremental_rev) uses difflib.SequenceMatcher.ratio() to fuzzy-match the changelog''s latest version string against existing tags, with a SIMILARITY_THRESHOLD = 0.89. When the changelog''s latest entry is something like 4.8.0.dev5, SequenceMatcher ratios it against v4.8.0 slightly higher than against v4.8.0.dev5 because the longer suffix penalises the ratio — so max() picks the wrong tag (or no tag passes the threshold), producing the reported "No tag found to do an incremental changelog" or wrong start_rev.
A targeted fix would prefer exact tag-match via TagRules.get_version_tags() (same logic the bump command already uses to find current versions) and only fall back to SequenceMatcher when no exact match exists. This avoids the asymmetry of the ratio metric on dev/prerelease suffixes.
Not putting up a PR yet because the right design (always exact, or always fall back, plus how to handle multi-version scheme repos) deserves a maintainer call. Keeping this open with wait-for-implementation.
Activity
peterdragun commentedon Dec 2, 2024
Do you have any updates for this? The issue (not sure if the only one) seems to be in using the
SequenceMatcherto match the version. This evaluates that version 1.1.0 is closer to 1.2.0 than 1.2.0.dev1, which is not correct and ends withNo tag found to do an incremental changelogerror. This is really frustrating and means we cannot use Commitizen for dev releases as it is completely broken.bearomorphism commentedon May 9, 2026
Adding
type: bugbased on the round-2 triage in #1965. The reporter''s own diagnosis matches what I see in master:commitizen/commands/changelog.py:131-161(_find_incremental_rev) usesdifflib.SequenceMatcher.ratio()to fuzzy-match the changelog''s latest version string against existing tags, with aSIMILARITY_THRESHOLD = 0.89. When the changelog''s latest entry is something like4.8.0.dev5,SequenceMatcherratios it againstv4.8.0slightly higher than againstv4.8.0.dev5because the longer suffix penalises the ratio — somax()picks the wrong tag (or no tag passes the threshold), producing the reported "No tag found to do an incremental changelog" or wrong start_rev.A targeted fix would prefer exact tag-match via
TagRules.get_version_tags()(same logic the bump command already uses to find current versions) and only fall back toSequenceMatcherwhen no exact match exists. This avoids the asymmetry of the ratio metric on dev/prerelease suffixes.Not putting up a PR yet because the right design (always exact, or always fall back, plus how to handle multi-version scheme repos) deserves a maintainer call. Keeping this open with
wait-for-implementation.