Support custom types for pre-commit hook
Description
As far as I can see, there is no way to customize the types when using the pre-commit hook. It would be nice to implement this somehow.
Possible Solution
Allow the hook to somehow work with a configuration file or have some arguments that can be passed when adding the pre-commit hook to the .pre-commit-config.yaml file.
Additional context
No response
Additional context
No response
@LukeHankey, it sounds like you are looking for this existing feature of pre-commit.
@LukeHankey do you think @Kurt-von-Laven solve your question? If not, could you please elaborate?
Hi both. I don't think that is what I was looking for. When running the cz check command, the pattern shows as pattern: (build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|bump)(\(\S+\))?!?:(\s.*). I was wondering, with the precommit hook, if it is possible to customize this pattern or add onto it with the args key or via one of the config files.
I have tried using a config file which seems to work with the pre-commit hook. Not sure if this is added anywhere on your docs but would be a good detail to add in the pre-commit section.
Yes, that sounds like the right approach. I apologize in advance if I am misunderstanding you again. The integrating with pre-commit section already makes it clear that the hook runs cz check. The fact that one would configure the pre-commit hook the same way one would configure Commitizen seems self-evident to me, but I have been working with pre-commit for a while now. Hooks generally work by running their namesake tool (in some cases on a given subset of files). All this to say, I'm not the best person to suggest how the docs might be clarified, but I imagine if you open a PR proposing what you would have found helpful, it will benefit others as well. I find that often simply rewording something for clarity can go a long way even if it doesn't technically change the meaning.
Thanks @Kurt-von-Laven . IMO, the document is clear enough. I'll close this issue for now. @LukeHankey If you think we should have more discuss or you can think of a way to improve the doc further, feel free to reopen it or send us a PR. Thanks!