commitizen / commitizen/cz-conventional-changelog

Something maybe wrong with the code in engine.js

Open
#139 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
793
Forks
444
PR merge metrics
No merged PRs in 30d

Description

Something maybe wrong with the code in engine.js

I think the following code block in engine.js
```
// Wrap these lines at options.maxLineWidth characters
var body = answers.body ? wrap(answers.body, wrapOptions) : false;
```
should be change to the follwing code:
```
var answerBody = answers.body?answers.body:'';
if (!answerBody) {
if (answers.breakingBody) {
answerBody = answers.breakingBody;
} else if (answers.issuesBody) {
answerBody = answers.issuesBody;
}
}
// Wrap these lines at options.maxLineWidth characters
var body = answerBody ? wrap(answerBody, wrapOptions) : false;
```

Otherwrise, how the questions "breakingBody" and "issuesBody" take effect? Do I miss something?

Contributor guide

No contributing guide indexed for this repository

Research direction

Open engine.js at the body-wrapping code and trace how breakingBody and issuesBody are collected and used. Verify the expected fallback behavior for those answers, then check the existing test coverage or run the project’s tests to confirm the resulting commit body.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.