commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

Global Configuration

Open liblaf opened this issue 3 years ago • 4 comments

Description

It would be nice to support global configuration, say ~/.cz.yaml, to reduce the trouble of creating custom commitizen for each project.

Possible Solution

Append Path.home() to cfg_search_paths in commitizen/config/__init__.py.

Additional context

No response

Additional context

No response

liblaf avatar Oct 01 '22 06:10 liblaf

https://github.com/commitizen-tools/commitizen/commit/41d3510bffebb0176177b6a1d65c0cdcdbd5a0d2

liblaf avatar Oct 01 '22 06:10 liblaf

This is something we remove since v2.0.0. I'm not sure whether we're to adding it back. I'm a bit against it. @woile What do you think?

Lee-W avatar Oct 07 '22 08:10 Lee-W

Having a global configuration would be fantastic. We have 100s of projects and creating a configuration for each project is a MAJOR pain.

jlanzarotta avatar May 11 '23 14:05 jlanzarotta

I'm also against having a global configuration. Not only adds more work for maintainers (people confused as of way their projects behaves in weird ways). But, I believe projects should have all the required info to work in the project itself. It might be a burden, but you are gonna need to tell every developer to install commitizen globally and configure it properly. And nothing prevents some automation to add the file to every project or a cookie cutter like tool. That being said, nothing prevents you from writing a custom cz-rule that reads from a global conf file.

You could have a GlobalConventionalCommits, and replace the source of the values:

https://github.com/commitizen-tools/commitizen/blob/master/commitizen/cz/base.py#L45

It could also be published to pypi and added to the third party section

woile avatar May 11 '23 15:05 woile

It looks like we've already concluded that we won't implement it. Close this one.

Lee-W avatar May 20 '24 21:05 Lee-W