Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring commitizen with uv - make "cz init" work with existing pyproject.toml #1361

Open
waterworthd-cim opened this issue Mar 1, 2025 · 1 comment
Labels
issue-status: wait-for-implementation maintainers agree on the bug / feature type: feature A new enhacement proposal

Comments

@waterworthd-cim
Copy link

Description

I'm evaluating commitizen as a simpler alternative to python-sematantic-release and other tools.

I've run into two issues, first the cz init command fails due to Config file pyproject.toml already exists - this is because I'm using uv which also has a uv init command - so once I've created my project using uv I don't appear to be able to intialise it for use with commitizen - is this the case or did I miss an something such as a cz init --force option?

Second, I use pre-commit to ensure with ruff etc to lint / format my code. This doesn't appear to integrate well with cz commit - i.e. if I stage changes, run pre-commit then cz commit everything is fine. If I forget to run pre-commit then I run the risk of losing everything I type (i.e. the commit message etc) because pre-commit may detect an issue which results in cz commit failing, losing everything I've typed.

Are there work-arounds for these issues?

Possible Solution

No response

Additional context

No response

Additional context

No response

@Lee-W
Copy link
Member

Lee-W commented Mar 20, 2025

Hey @waterworthd-cim , sorry for the late reply.

I guess the first one is not yet supported, but it might be a valid feature 🤔 I usually do some copy-and-paste with these commands

For the second one, you can try cz commit --retry.

@Lee-W Lee-W added type: feature A new enhacement proposal issue-status: wait-for-implementation maintainers agree on the bug / feature and removed issue-status: needs-triage labels Mar 20, 2025
@Lee-W Lee-W changed the title Configuring commitizen with uv Configuring commitizen with uv - make "cz init" work with existing pyproject.toml Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-status: wait-for-implementation maintainers agree on the bug / feature type: feature A new enhacement proposal
Projects
None yet
Development

No branches or pull requests

2 participants