Comments (28)
Please review #25 it should solve the issue and bring back functionality
from commitizen-action.
@datanrd, No tag found to do an incremental changelog
suggests to me that you may have started doing a sparse checkout by failing to pass fetch-depth: 0
to actions/checkout
. A sparse checkout does not include tags, so Commitizen cannot do its job.
from commitizen-action.
@Kurt-von-Laven @woile I'm not thinking; I'm sorry. I need fetch-depth
to checkout the last version tag, not the new one I'm trying to create.
from commitizen-action.
Yeah, and just to be clear for the sake of anyone following this thread, my understanding is that passing fetch-depth: n
for any value of n
other than 0
, retrieves no tags at all since you are still doing a sparse checkout.
from commitizen-action.
Oh, I see your point. Maybe this is a feature request for commitizen-tools/commitizen in that case? @woile will know better than I though.
from commitizen-action.
@Kurt-von-Laven @woile nvm, I figured it out. I had to use your repo plus https://github.com/ncipollo/release-action
. See this run
from commitizen-action.
No, it should've been closed. @metya this ticket discusses multiple different problems, please open a new issue with your problem and provide more information.
In github actions if you use the GITHUB_TOKEN
, it behaves as using [skip-ci]
.
If you need to add [skip-ci]
it won't solve anything in github actions, because it doesn't care about it. But you can add it by using:
[tool.commitizen]
bump_message = "release $current_version → $new_version [skip-ci]"
Alternatively, you can skip a commit in github actions using:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
If you need to make a release, look at commitizen's documentation
I'm closing this as it's off-topic, please open new issues for other problems
from commitizen-action.
I'm having the same issue.
Also, it's a problem that it breaks existing CIs in which I have fixed the version - which worked fine until the underlying package changed.
Using the action:
id: commitizen
uses: commitizen-tools/[email protected]
with:
github_token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
Logs from my failing workflow:
Commitizen version:
2.21.0
Running cz: --changelog
[NO_COMMITS_TO_BUMP]
The commits found are not elegible to be bumped
chore(version): 0.6.2 → 0.6.2
tag to create: 0.6.2
increment detected: None
from commitizen-action.
That's very strange, gonna take a look, thanks for reporting!
from commitizen-action.
Could you share some samples of the commits that are not being detected?
thanks!
from commitizen-action.
I think I didn't give enough details, sorry about that !
For my part the problem isn't that the commit isn't detected, but rather that now the action fails for a specific case when before it didn't :)
So feat
or fix
commits work fine, but ci
or perf
commits make the whole CI fail.
I solved it for the moment by using continue-on-error: true
in my workflow, but I'm afraid of the other errors this could lead to.
I assume it's due to this patch : commitizen-tools/commitizen#473
But the fact that the version of the action (v0.11.0) can use different package versions is a problem - shouldn't we choose to update the action to use a new version of Commitizen ?
from commitizen-action.
I think we could make the action point to latest
by default, or manually enter the version.
I think the problem here is that I introduced a change that I didn't think was gonna break commitizen.
It should've been a major release if I had known better, I apologise for that 🙏🏻
from commitizen-action.
I've created a PR to introduce the version, if you could review I'd appreciate
from commitizen-action.
Great idea to be able to manually enter the version while keeping the original latest
by default :)
Thanks a lot for the quick fix ! I looked at the PR and added a comment - I'm not very familiar with the codebase but can review if needed !
from commitizen-action.
@floredelasteyrie I've proposed another option in #21 that may be useful to your situation as well.
from commitizen-action.
New changes to revert back the version were introduced already in this action.
I'm working on this PR as well: commitizen-tools/commitizen#489 which I'll then integrate into this action
from commitizen-action.
@woile Is this not fixed yet? I am having the same issue on:
commitizen: 2.35.0
commitizen-tools/commitizen-action: 0.15.0
from commitizen-action.
What happens if you do git tag
in the CI? Does any version appear?
from commitizen-action.
@woile @Kurt-von-Laven How can I push without triggering CI? GitHub supports adding a comment to the commit message, like [skip ci]
that will skip CI.
Can I do this somehow with the commitizen-action
?
from commitizen-action.
@Kurt-von-Laven @woile I suppose for now, I can add
if: "!startsWith(github.event.head_commit.message, 'bump:')"
to the beginning of those workflow jobs I don't want to run when this happens.
Just wondering if there's another way to do this?
from commitizen-action.
You could customize the bump commit message to include skip ci and use that condition with skip ci instead of bump:
from commitizen-action.
@woile How do you customize the message from within a GitHub Actions workflow?
from commitizen-action.
Do the official Commitizen docs answer your question?
from commitizen-action.
Do the official Commitizen docs answer your question?
No because that gives you general information about how to customize all commit messages, but we would need to customize the message to have a comment if the bump:
is in the message.
This probably involves some form of a regular expression I'm sure...
from commitizen-action.
No worries at all. I'm sure I could figure it out if I devoted more time to it, but it's more time than I have to commit at the given moment. It would be nice as an example added to the documentation, so a feature request sounds appropriate.
from commitizen-action.
@Kurt-von-Laven @woile I need to
- bump versions
- build multiple wheels to that version for different platforms, and finally
- create a release with all the wheels
I'm trying to figure out how to do this. I'm not able to update a release once it's created, but I'm also not finding a way to pass ${{ env.REVISION }}
from the bump version step to the release step (${{ github.ref_name }}
is main
for me, not my tag).
How can I achieve this?
from commitizen-action.
Any news about the issue?
I have the same problem and don't know how to fix.
from commitizen-action.
@metya, are you already passing fetch-depth: 0
to actions/checkout? I'm actually not sure why this issue is still open. @woile, did you envision some further change beyond #20 and #25?
@adam-grant-hendry, I recently learned of semantic-release, which may be helpful to you or others in the future with more complex use cases.
from commitizen-action.
Related Issues (20)
- [FEAT]: 🎉 Add Discussions Tab
- [FEAT]: 🎉 Add Support for GPG Signing HOT 1
- `check_consistency` has no effect
- Clarification on how the workflow updates changelog and version HOT 4
- Actor of pushing to branch should be configurable HOT 1
- Container error `fatal: --local can only be used inside a git repository` HOT 9
- Bump failing after upgrade from 0.16.0 -> 0.16.1 HOT 5
- Option for opening a PR instead of pushing directly to branch HOT 6
- options --name to select the commitizen HOT 8
- Reporting a vulnerability HOT 2
- No tag found to do an incremental changelog HOT 2
- Running the action with changelog_increment_filename fails HOT 2
- gpg: signing failed: No secret key HOT 3
- Pre-Bump Scripts do not have access to packages installed before using `commitizen-tools/commitizen-action` HOT 9
- Bump commit in detached HEAD state not being pushed to master branch HOT 1
- How to use pre_bump_hook scripts with this action HOT 1
- [BUG]: Unstaged Changes HOT 8
- Option to specify MANUAL_VERSION HOT 1
- Git output in the changelog increment file
- Action does not find a specified file in version_files HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commitizen-action.