File tree 2 files changed +14
-4
lines changed
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) {
125
125
{
126
126
type : 'input' ,
127
127
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
+ }
131
140
} ,
132
141
{
133
142
type : 'confirm' ,
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ var options = {
23
23
( process . env . CZ_MAX_LINE_WIDTH &&
24
24
parseInt ( process . env . CZ_MAX_LINE_WIDTH ) ) ||
25
25
config . maxLineWidth ||
26
- 100
26
+ 100 ,
27
+ maxBodyLineWidth : config . maxBodyLineWidth || 80
27
28
} ;
28
29
29
30
( function ( options ) {
You can’t perform that action at this time.
0 commit comments