File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -125,9 +125,18 @@ module.exports = function(options) {
125125 {
126126 type : 'input' ,
127127 name : 'body' ,
128- message :
129- 'Provide a longer description of the change: (press enter to skip)\n' ,
130- default : options . defaultBody
128+ message : function ( answers ) {
129+ return (
130+ 'Provide a longer description of the change (max ' +
131+ options . maxBodyLineWidth +
132+ ' chars per line): (press enter to skip)\n'
133+ ) ;
134+ } ,
135+ default : options . defaultBody ,
136+ transformer : function ( body ) {
137+ var color = chalk . green ;
138+ return color ( '(' + body . length + ') ' + body ) ;
139+ }
131140 } ,
132141 {
133142 type : 'confirm' ,
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ var options = {
2323 ( process . env . CZ_MAX_LINE_WIDTH &&
2424 parseInt ( process . env . CZ_MAX_LINE_WIDTH ) ) ||
2525 config . maxLineWidth ||
26- 100
26+ 100 ,
27+ maxBodyLineWidth : config . maxBodyLineWidth || 80
2728} ;
2829
2930( function ( options ) {
You can’t perform that action at this time.
0 commit comments