Skip to content

Commit 11a26e0

Browse files
dani-scJPeer264
authored andcommitted
feat: make commit messages mandatory
1 parent be60087 commit 11a26e0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

lib/sgcPrompt.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,18 @@ const sgcPrompt = () => {
2626
}, {
2727
type: 'input',
2828
name: 'description',
29-
message: 'Describe your commit message:',
29+
message: 'Enter your commit message:',
30+
validate: input => new Promise((resolve, reject) => {
31+
if (input) {
32+
resolve(true);
33+
} else {
34+
reject('A commit message is mandatory!');
35+
}
36+
}),
3037
}, {
3138
type: 'confirm',
3239
name: 'moreInfo',
33-
message: 'You want to add more information to your commit?',
40+
message: 'Do you want to add more information to your commit?',
3441
default: false,
3542
}, {
3643
type: 'editor',

0 commit comments

Comments
 (0)