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

Enable multiple locations of config file .cz.* #955

Closed
keenonkites opened this issue Jan 8, 2024 · 2 comments
Closed

Enable multiple locations of config file .cz.* #955

keenonkites opened this issue Jan 8, 2024 · 2 comments
Assignees
Labels

Comments

@keenonkites
Copy link

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

@Lee-W
Copy link
Member

Lee-W commented Feb 10, 2024

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?

@woile
Copy link
Member

woile commented May 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants