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

Add validation of answers: disallow having BREAKING CHANGE but no body #43

Closed
vovacodes opened this issue Jan 27, 2017 · 4 comments
Closed

Comments

@vovacodes
Copy link

vovacodes commented Jan 27, 2017

Take a commit message like this:

feat: something

BREAKING CHANGE: some breaking change

The BREAKING CHANGE section is not recognized by the tools that analyze commits, e.g. semantic-release, because BODY part of the commit is missing and they think the FOOTER is actually a BODY.
Is this a correct behavior of those tools or in other words should it be allowed to specify FOOTER without providing BODY?

If this should be forbidden, we could add the validation function to our inquirer code to validated these cases

@jimthedev
Copy link
Member

I agree this needs to be improved but it is how the original angular commit convention was written. We could perhaps find some message to use as filler in this special case? Can you think of a good filler section to indicate that there is no commit body?

@yinzara
Copy link
Contributor

yinzara commented Jan 11, 2019

With my PR #75

You can set the "config.commitzen.defaultBody" to something like "-" which will at least guarantee there is always a body. I guess we could probably just make that happen by default if there is a breaking change.

@yinzara
Copy link
Contributor

yinzara commented Feb 6, 2019

I have added additional questions that only appear if you add a breaking change or an issue reference but have no description. It defaults the value to "-" but prompts you to change it.
#75

@jimthedev
Copy link
Member

I think this is released in 3.0.0

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

No branches or pull requests

3 participants