Add `pre-commit` hook that will run Commitizen on `git commit`
See original GitHub issueBackground
pre-commit is a package manager for git hooks. The project allows hooks to be downloaded locally and run in an isolated environment. This allows for easy adoption of hooks written in a variety of languages and allows for quick adoption by contributors who are unfamiliar with any particular hook.
Possible Solution
This project can make itself pre-commit
compatible by adding a .pre-commit-hooks.yaml
file. You can use this file to make your existing prepare-commit-msg
hook and the Commitizen project as a whole more accessible.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14
Top Results From Across the Web
Supported hooks - pre-commit
forbid-autopkg-trust-info - This hook prevents AutoPkg recipes with trust info from being added to the repo. munki-makecatalogs - This hook runs the " ......
Read more >Contributing - Commitizen
Clone the repository from your GitHub. Setup development environment through poetry ( poetry install ). Setup pre-commit hook ( pre-commit install -t pre-commit...
Read more >Making commits the right way with hooks - DEV Community
"husky": { "hooks": { "pre-commit": "echo Hello World!" } } You can add any git-hooks within hooks .
Read more >How to use the latest Husky 8 with Commitizen for adding git ...
I've been trying to setup Husky with Commitizen to add git hooks to my project. ... The pre-commit hook is run before we...
Read more >Git hooks with husky & commitlint - Techiediaries
We can utilize Husky to add a git hook to the commit command. Head over to your command-line interface, make sure you navigate...
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 Free
Top 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
Hi @ShaneKosieradzki , if it helps, you can use husky to run pre commit hooks.
Install husky:
npm install--save-dev husky
Then run this to add a pre commit message hook:
npx husky add .husky/prepare-commit-msg "exec < /dev/tty && git cz --hook || true"
Note, you will probably want to add the resulting hook file to git:
.husky/prepare-commit-msg
I know that isn’t enhancing commitizen itself, but it does get you the pre commit hooks
Hope that helps!
Could someone here help me with this?:
https://stackoverflow.com/questions/72264186/post-merge-hook-to-commitizen-bump-and-changelog