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

answers. breakingBody and answers. issuesBody does not affect the commit message at all. #115

Open
Val-istar-Guo opened this issue Mar 11, 2020 · 2 comments

Comments

@Val-istar-Guo
Copy link

Val-istar-Guo commented Mar 11, 2020

{
type: 'input',
name: 'breakingBody',
default: '-',
message:
'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself:\n',
when: function(answers) {
return answers.isBreaking && !answers.body;
},
validate: function(breakingBody, answers) {
return (
breakingBody.trim().length > 0 ||
'Body is required for BREAKING CHANGE'
);
}
},

answers.breakingBody does not affect the commit message at all.

var body = answers.body ? wrap(answers.body, wrapOptions) : false;

I wrote breakingBody but found this doesn't make any sense. I read the code and I can't understand the meaning of this existence.

I find the issue #43 and #75.

Shouldn't the body be combined like this?

var b = answers.body || answers.breakingBody || answers.issuesBody
var body = b ? wrap(b , wrapOptions) : false; 
@s14k51
Copy link

s14k51 commented Apr 15, 2020

+1 on this. I noticed this issue today. It affects both breakingBody and issuesBody.

As an example of what is happening:

At first, I skipped the body, but answered Yes for the Does this change affect any open issues? question, then it asked me to provide a longer description, but when I provided the description, it did not get added to the body section in the commit below the commit message.

Expected

feat(something): add some changes

These changes remove something and add a different thing

Closes XXXX

Actual

feat(something): add some changes

Closes XXXX

So, the issuesBody is not being used to construct the body at all.

@Val-istar-Guo Val-istar-Guo changed the title answers. breakingBody does not affect the commit message at all. answers. breakingBody and answers. issuesBody does not affect the commit message at all. Apr 20, 2020
lllllllqw added a commit to lllllllqw/cz-conventional-changelog that referenced this issue Sep 24, 2020
lllllllqw added a commit to lllllllqw/cz-conventional-changelog that referenced this issue Sep 24, 2020
@yarthur
Copy link

yarthur commented Jun 17, 2021

#132 claims to fix this issue, and I would love to see this issue fixed. Is there anything I can do to help get things merged?

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