-
-
Notifications
You must be signed in to change notification settings - Fork 281
Restrict list of types / scopes #24
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
Comments
Hey I'm glad you like it! Thanks for the kind words. Regarding the
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? |
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 In some projects, there could be a list of pre-defined What I had suggested is to have them into I hope to be clearer this time |
Oh sorry, I completely misunderstood it haha. Ideally this should be done using a custom rule you could even inherit from from commitizen.cz.conventional_commits import ConventionalCommitsCz
class ConventionalCommitsScope(ConventionalCommitsCz):
def questions(self) -> list:
questions = super().questions()
questions[2] = {
"type": "list",
"name": "scope",
"message": "Choose your scope",
"choices": [
{
"value": "mysuperscope",
"name": "this is a crazy scope"
}
]
}
return questions
discover_this = ConventionalCommitsScope You can read more in the link provided on how to create the 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 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 |
Hi @woile,
Thanks you for this awesome project.
It really let developers (at least me) focusing on code.
However, I have a little suggestion. I see (in https://woile.github.io/commitizen/config/) that we can specify the format to use.
It could be a great feature (at least for
private
project) to have an option to specifytype
s allowedscope
What do you think ?
PS : It's more to avoid errors (keeping a flexibility) than restricts
The text was updated successfully, but these errors were encountered: