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
Hey I'm glad you like it! Thanks for the kind words.
Regarding the type and scope. If I understand correct you'd like to use format like:
v$minor.$major.$path-$scope-$type
The problem with this approach is that you might have more than one commit between versions, so it doesn't make much sense to specify a tag with information of one of those commits, I think it would be quite confusing. What do you think?
fromcommitizen.cz.conventional_commitsimportConventionalCommitsCzclassConventionalCommitsScope(ConventionalCommitsCz):
defquestions(self) ->list:
questions=super().questions()
questions[2] = {
"type": "list",
"name": "scope",
"message": "Choose your scope",
"choices": [
{
"value": "mysuperscope",
"name": "this is a crazy scope"
}
]
}
returnquestionsdiscover_this=ConventionalCommitsScope
You can read more in the link provided on how to create the setup.py file.
I think that would solve your problem in the short term.
Regarding providing a configuration I will try to come up with something. I don't think those values should be part of the global config, because you can write your own commit rules and scope and type would stop having meaning in the context of your custom rule (different to conventional commits).
But maybe, there should be a way to customize your current rule through configuration.
[tool.commitizen.rule-conf.scope]
type = "list"name = "scope"message = "Choose your scope"choices = [{"value": "mysuperscope","name": "this is a crazy scope"}]
It would be nice to brainstorm ideas on how to do it. Specially on how to express that if you are not using the toml configuration, but the normal ConfigParser.
Activity
woile commentedon May 10, 2019
Hey I'm glad you like it! Thanks for the kind words.
Regarding the
typeandscope. If I understand correct you'd like to use format like:The problem with this approach is that you might have more than one commit between versions, so it doesn't make much sense to specify a tag with information of one of those commits, I think it would be quite confusing. What do you think?
waghanza commentedon May 10, 2019
Hi,
I think I wasn't clear enough. In fact I'm talking about commit messages.
As conventional commit specifications explain, there could be a
scope, an optional one.In some projects, there could be a list of pre-defined
scopes (as long as a pre-defined list oftypes).What I had suggested is to have them into
.czfile, as long as we can define per repo standard.I hope to be clearer this time
woile commentedon May 10, 2019
Oh sorry, I completely misunderstood it haha.
Ideally this should be done using a custom rule
you could even inherit from
ConventionalCommitsCzYou can read more in the link provided on how to create the
setup.pyfile.I think that would solve your problem in the short term.
Regarding providing a configuration I will try to come up with something. I don't think those values should be part of the global config, because you can write your own commit rules and
scopeandtypewould stop having meaning in the context of your custom rule (different to conventional commits).But maybe, there should be a way to customize your current rule through configuration.
It would be nice to brainstorm ideas on how to do it. Specially on how to express that if you are not using the
tomlconfiguration, but the normalConfigParser.feat(cz/filters): add required_validator and multiple_line_breaker