commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

Enable multiple locations of config file .cz.*

Open keenonkites opened this issue 1 year ago • 1 comments

Description

Actually the only supported location for the config file .cz.* is the root folder of the project (according to the docu).

It would be great to have the following additional configuration levels also:

  • global (per user, for all projects)
  • system (for all users on this system)

The reason behind the request is that we don't need fullfledged conventional commits (scope e.g. can be skipped) and would like to customize it, but don't want to have the same cz.* config file in every repo on the system.

Actually we use commitizen mainly for properly formated commit messages.

Possible Solution

The actual code already has a list of configuration file names (defaults.py) and a list of cfg_warch_paths (config/init.py). Therefore it should not be to hard to add a global (user) directory and a system wide directory for searching too (at least with my limited pyhton knowledge).

Additional context

No response

Additional context

No response

keenonkites avatar Jan 08 '24 16:01 keenonkites

I'm not sure we would like to add this feature. We have the global config feature on 1.0 and remove on 2.0. @woile @noirbizarre Thought?

Lee-W avatar Feb 10 '24 06:02 Lee-W

The recommendation is to use a custom rule: https://commitizen-tools.github.io/commitizen/customization/#2-customize-through-customizing-a-class

Then your team can install that custom rule without scopes and however you want, you can take a look at this example: https://github.com/noirbizarre/emotional

We removed global config because it creates problems

woile avatar May 21 '24 06:05 woile