custom committer plugin not found when using cz check via git hook
See original GitHub issueDescription
I wrote a custom plugin to enforce our desired commit message template, it works fine when I invoke cz check but when I call cz check via the git commit hook it fails
The committer has not been found in the system.
Try running 'pip install cz_algotec'
my githook is written in python and invoked via shebang, I tried adding an install via pip to the custom plugin package (locally avilable0 but it doesn’t help. I verified the package is found when using pip list and also it works when I invoke cz check from the command line I don’t know what’s the difference from the hook invocation (calling sub_process.run - with shell:True)
Steps to reproduce
- write a custom plugin, use it’s name in the …cz.toml file
- call cz check to invoke commitizen from the
commit-msg
script
Current behavior
fail to run the custom logic
Desired behavior
custom logic runs,
Environment
cz version 2.20.0 Python Version: 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] Operating System: Windows
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Git Hooks - Git SCM
Like many other Version Control Systems, Git has a way to fire off custom scripts when certain important actions occur. There are two...
Read more >git - pre-commit/hook: No such file or directory - Stack Overflow
Go to .git/hooks directory and remove pre-commit file, as its trying to reference to node_modules/pre-commit/hook .
Read more >commit-msg Hook - gerrit-review
A Git hook automatically invoked by git commit , and most other commit creation tools such as git citool or git gui ....
Read more >Ensure Conventional Commits in your SBT projects
After experimenting with a couple of conventional commit tools I came ... changes to the custom git hooks, committers must remember to copy ......
Read more >Git commit messages for the bold and the daring - Nulab
If you're not sure whether you're already using a Git template in your ... use custom scripts to make sure those hooks are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I found the cause, it related to this https://github.com/ros/rosdistro/issues/18116 - the use of _ (underscopes) in pip package names, when I use pip list it shows me I have cz-algotec (with hypen) and that’s why it can’t find it ??? still reseaching, some help would be appriciated, has anyone managed to use custom rules at all??
thanks @KyleKing , I ditched commitizen for now and moved to use commitlint