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
I want to use commitizen in my repository and automatically bump vresion to pipy (and maybe someday conda-forge). Looking at the documentation I started with github actions that are still not compatible with my repository structure (I have a main branch and I'm working directly on it).
So I wanted to go with the CLI that looks exactly like what i needed:
When I run cz bump I get the following error message:
No tag found to do an incremental changelog
If I clean the changelog.md file, it works but I then only have the latest tag and not the previous one.
So I changed the .cz.yaml file to bump the changelog in a second step:
update_changelog_on_bump: false
Then the tag is created but running cz changelog end up with the same error message.
When I print my tags they are all here even some that I don't want to use:
ok now I wrapped my head around it. I was (naively) thinking that tags were pushed to distant repo but nope. So these tags are only existing on my local creating all sort of isssues (actions not triggered), previous tag not existing etc...
Now that the workflow is clearer to me, it works like a charm. thanks for the guidance !
Sorry to reopen it again but I fail to get it every time I want to use the cz bump command it fails because of the changelog (which the main feature of cz for me). All the solutions I found so far are small patches from my side but I would like to better understand what's behinf this error message.
So still the same old problem, I changed stuff in my repository sepal_ui and on a fresh clone and I run cz bump, result:
bump: version 2.9.4 → 2.10.0
tag to create: v_2.10.0
increment detected: MINOR
No tag found to do an incremental changelog
which is again not working. looking at the tags:
the last one is v_2.9.4 which should work. could you clone my repository and simply help me diagnose what's wrong ?
I printed the partial result of the evaluation from my side:
bump: version 2.9.4 → 2.10.0
tag to create: v_2.10.0
increment detected: MINOR
["v_2.9.4: (0.8333333333333334, GitTag('v_2.9.4', 'b01d653a693c700675034e94bdb014cc1ae75afb', '2022-06-09'))"
That's the latest but as .83 < .89 I get an error.
Would it be possible to reduce the value to let's say .8 ? and add my example to the tests ?
Sounds great! maybe we could list what we have tested, so the next time we want to change the value we'll have a better idea on why we decide to use that value from the very begining
@souravjamwal77 May I know what was the commit types (e.g., feat, fix)? If there's only ci, doc and etc., commitizen won't bump the version. This is the default bump_map
@Lee-W, I will have the time to work on this in the next 2 weeks, where would you like me to write the tests and is there already an example where you create a fake changelog with a normal version tree (to get some inspiration) ?
I'm having the same issue, but only on Github actions.. Doing CZ bump locally seems to work, but using the github actions setup always seems to yield:
cz --no-raise 21 bump --yes --changelog --check-consistency --changelog-to-stdout >CHANGELOG.md
bump: version 0.1.0 → 0.1.1
tag to create: 0.1.1
increment detected: PATCH
No tag found to do an incremental changelog
Can someone take a look at my repo and settings to see why this might be? link I've tried setting the tag format both with and without a v, but nothing seems to fix it.
-- EDIT
I found a fix for my case (which was more a github CI yml issue than the issues listed here, but threw the same error message), I had changed the "body.md" file in the example yml, because i thought it should be the name of your changelog, but that's not the case. changing back to body.md fixed it. I also had to add a permissions:write setting in the yml file to properly push the new release, otherwise the bump occurred in github ci but not the release.
Reacted by Santiago Fraire Willemoes and Jennings Fantini
Everything works fine if I comment out changelog_increment_filename: CHANGELOG.md. I just want the newest changes to be shown for each release, ie incremental?
`vscode ➜ /workspaces/Project (proj_branch) $ cz bump
bump: version 0.0.1 → 0.1.0
tag to create: v0.1.0
increment detected: MINOR
No tag found to do an incremental changelog`
Deleted the CHANGELOG.md file and committed changes using cz commit. When cz bump is executed, tag is created and CHANGELOG.md file automatically generated.
`Commit successful!
vscode ➜ /workspaces/Project (proj_branch) $ cz bump
bump: version 0.0.1 → 0.1.0
tag to create: v0.1.0
increment detected: MINOR
I am facing the same issue when perfoming the first bump with commitizen version: 3.30.0
$ cz bump
Tag 0.0.0 could not be found.
Possible causes:
- version in configuration is not the current version
- tag_format is missing, check them using 'git tag --list'
? Is this the first tag created? Yes
bump: version 0.0.0 → 0.1.0
tag to create: 0.1.0
increment detected: MINOR
No tag found to do an incremental changelog
Or this
$ cz bump --yes --changelog --check-consistency --git-output-to-stderr --changelog-to-stdout >body.md
bump: version 0.0.0 → 0.1.0
tag to create: 0.1.0
increment detected: MINOR
No tag found to do an incremental changelog
Reacted by Marcos Schroh and Ignacio Fernandez Dussaut
yep, we could open it. I'm kinda out of bandwidth recently. would appreciate if we could have detailed reproducing steps so that I can get into it quicker when I have time
Activity
woile commentedon Dec 17, 2021
I cloned your repo, and I think your main issue is the
tag_format, which includes avnow.I changed it like this:
And then created the missing tag (0.12.9).
After that when doing
cz bumpit works (you still have to create a new commit because there won't be any).Let me know if this helps, because in your examples there are tags that are not available in the repo you linked.
12rambau commentedon Dec 17, 2021
ok now I wrapped my head around it. I was (naively) thinking that tags were pushed to distant repo but nope. So these tags are only existing on my local creating all sort of isssues (actions not triggered), previous tag not existing etc...
Now that the workflow is clearer to me, it works like a charm. thanks for the guidance !
woile commentedon Dec 17, 2021
Great news!
What we usually do is let the github action create the tag and then push back to the repo.
Here's the tutorial for github actions: https://commitizen-tools.github.io/commitizen/tutorials/github_actions/
12rambau commentedon Dec 17, 2021
I'm waiting for this issue to be solved as I'm using a
mainbranch12rambau commentedon Jan 11, 2022
I'm reopening the issue because it's the exact same problem in another repository. I thought I had understand but it seems I didn't...
So in this repository: https://github.com/12rambau/sepal_ui I wanted to do the exact same thing: create the changelog on bump.
currently I'm not. I tried to add to folowing in my
.cz.yamlfile:But I'm getting the exact same error:
This time I checked my tags and they should all be here with a
v_*.*.*value, the last one beingv_2.5.3. So what am I missing this time ?woile commentedon Jan 12, 2022
It works fine on my side. I cloned, run
cz bumpand the tag created wasv_2.5.3with the changelog.My conf:
on ubuntu
12rambau commentedon Mar 28, 2022
I think that's because I had manually updated the changelog file. I deleted it on the 2.6.2 release and everything came back to normal
ci(deployment): remove "v" from tag format
12rambau commentedon Jul 18, 2022
Sorry to reopen it again but I fail to get it every time I want to use the
cz bumpcommand it fails because of the changelog (which the main feature of cz for me). All the solutions I found so far are small patches from my side but I would like to better understand what's behinf this error message.So still the same old problem, I changed stuff in my repository sepal_ui and on a fresh clone and I run
cz bump, result:which is again not working. looking at the tags:
the last one is
v_2.9.4which should work. could you clone my repository and simply help me diagnose what's wrong ?12rambau commentedon Jul 21, 2022
I digged a bit in the lib and it seems the problem for me is coming from the way commitizen is recognizing tags in the tag list.
commitizen/commitizen/commands/changelog.py
Line 67 in 234765d
I printed the partial result of the evaluation from my side:
That's the latest but as .83 < .89 I get an error.
Would it be possible to reduce the value to let's say .8 ? and add my example to the tests ?
4 remaining items
Lee-W commentedon Jul 23, 2022
Sounds great! maybe we could list what we have tested, so the next time we want to change the value we'll have a better idea on why we decide to use that value from the very begining
souravjamwal77 commentedon Aug 1, 2022
Hi I was trying to run
cz bumpbut it's failing with the same error code. Below is mypyproject.tomlfileAlso, I'm not setting any git tags, just trying to use cz directly as a PoC for our CI/CD process.
Can anyone suggest, what shall I do?
Lee-W commentedon Aug 2, 2022
@souravjamwal77 May I know what was the commit types (e.g., feat, fix)? If there's only
ci,docand etc., commitizen won't bump the version. This is the default bump_mapcommitizen/commitizen/defaults.py
Line 73 in 85d9939
12rambau commentedon Jan 15, 2023
@Lee-W, I will have the time to work on this in the next 2 weeks, where would you like me to write the tests and is there already an example where you create a fake changelog with a normal version tree (to get some inspiration) ?
Lee-W commentedon Jan 18, 2023
@12rambau Is this something you're looking for? https://github.com/commitizen-tools/commitizen/blob/master/tests/test_changelog.py#L516
mmorley0395 commentedon Apr 12, 2023
I'm having the same issue, but only on Github actions.. Doing CZ bump locally seems to work, but using the github actions setup always seems to yield:
Can someone take a look at my repo and settings to see why this might be? link I've tried setting the tag format both with and without a v, but nothing seems to fix it.
-- EDIT
I found a fix for my case (which was more a github CI yml issue than the issues listed here, but threw the same error message), I had changed the "body.md" file in the example yml, because i thought it should be the name of your changelog, but that's not the case. changing back to body.md fixed it. I also had to add a permissions:write setting in the yml file to properly push the new release, otherwise the bump occurred in github ci but not the release.
woile commentedon Apr 28, 2023
I've updated the docs for github actions. I think this issue shouldn't be happening anymore.
Try using latest
actions/checkout@v3and latest commitizenjjfantini commentedon Sep 26, 2023
I had changed from body.md to CHANGELOG.md, and I am still getting this error using the Github action.
Settings:
Github Action:
Everything works fine if I comment out
changelog_increment_filename: CHANGELOG.md. I just want the newest changes to be shown for each release, ie incremental?jjfantini commentedon Sep 26, 2023
switching to
body.mdfor both instances fixes the issueTijoT commentedon May 28, 2024
I was also having similar problem.
`vscode ➜ /workspaces/Project (proj_branch) $ cz bump
bump: version 0.0.1 → 0.1.0
tag to create: v0.1.0
increment detected: MINOR
No tag found to do an incremental changelog`
Deleted the CHANGELOG.md file and committed changes using
cz commit. Whencz bumpis executed, tag is created and CHANGELOG.md file automatically generated.`Commit successful!
vscode ➜ /workspaces/Project (proj_branch) $ cz bump
bump: version 0.0.1 → 0.1.0
tag to create: v0.1.0
increment detected: MINOR
[proj_branch c7f4000] bump: version 0.0.1 → 0.1.0
4 files changed, 18 insertions(+), 17 deletions(-)
Done!`
mateusht-ciandt commentedon Nov 8, 2024
I am facing the same issue when perfoming the first bump with commitizen version: 3.30.0
Or this
mrclrchtr commentedon Apr 22, 2025
the same here and somehow irritating... i have invested quite a lot of time to end up here... can the issue please be reopened?
Lee-W commentedon Apr 23, 2025
yep, we could open it. I'm kinda out of bandwidth recently. would appreciate if we could have detailed reproducing steps so that I can get into it quicker when I have time