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

fix(engine.js): make breakingBody and issuesBody affect the commit message #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion engine.js
Original file line number Diff line number Diff line change
@@ -33,6 +33,10 @@ var filterSubject = function(subject, disableSubjectLowerCase) {
return subject;
};

var getBody = function(answers) {
return answers.body || answers.breakingBody || answers.issuesBody
}

// This can be any kind of SystemJS compatible module.
// We use Commonjs here, but ES6 or AMD would do just
// fine.
@@ -203,7 +207,8 @@ module.exports = function(options) {
var head = answers.type + scope + ': ' + answers.subject;

// Wrap these lines at options.maxLineWidth characters
var body = answers.body ? wrap(answers.body, wrapOptions) : false;
var body = getBody(answers)
body = body ? wrap(body, wrapOptions) : false;

// Apply breaking change prefix, removing it if already present
var breaking = answers.breaking ? answers.breaking.trim() : '';