You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should .cz.toml actually include the tool table? #1114
I like that the commitizen can be configured via the tool-specific file like .cz.toml.
The configuration is based on the tool root table, e.g.:
[tool.commitizen]
name = "cz_customize"
[tool.commitizen.customize]
# ...
what corresponds to the convention used in pyproject.toml - i.e. the same piece of config as the one above can be copy-pasted directly to pyproject.toml without any updates. That's cool.
I think, however, that the config in .cz.toml should not be based on the tool table, because this may suggest (somewhat) that the file is not entirely commitizen-specific.
Therefore, I would go simply with:
name = "cz_customize"
[customize]
# ...
or
[commitizen]
name = "cz_customize"
[commitizen.customize]
# ...
Of course, one can avoid a breaking change by making this optional.
Possible Solution
References to [tool.commitizen] are found in commitizen.config.toml_config module. Thus, any changes should involve updating the methods of the TomlConfig class.
Additional context
No response
Additional context
There are some Python tools using this approach, e.g.:
Thanks for opening this issue. Sounds valid to me but could potentially be a breaking change. maybe we could change it in v4. @woile@noirbizarre what do you think?
I don't have a strong opinion on this one. But if we have an objection from the maintainer, I think we probably won't change this. I'll keep it for a few days before closing it. @paduszyk@noirbizarre please let us know if you have any thought 🙂
Activity
Lee-W commentedon May 15, 2024
Thanks for opening this issue. Sounds valid to me but could potentially be a breaking change. maybe we could change it in v4. @woile @noirbizarre what do you think?
woile commentedon May 15, 2024
Personally I like being able to copy-paste, and it's feels like opening the window for a whole new set of bugs for very little in return
Lee-W commentedon May 16, 2024
I don't have a strong opinion on this one. But if we have an objection from the maintainer, I think we probably won't change this. I'll keep it for a few days before closing it. @paduszyk @noirbizarre please let us know if you have any thought 🙂
paduszyk commentedon May 16, 2024
@Lee-W Thanks for considering it anyway 🙂
Lee-W commentedon May 17, 2024
I'll close it for now and mark it as
won't fixtill we have a solid rationale to do so. Thanks!