diff options
Diffstat (limited to 'scripts/verifyCommit.ts')
| -rw-r--r-- | scripts/verifyCommit.ts | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/verifyCommit.ts b/scripts/verifyCommit.ts index e2c4ae70..11f22ab4 100644 --- a/scripts/verifyCommit.ts +++ b/scripts/verifyCommit.ts @@ -18,16 +18,22 @@ const isMergeCommit = msg.startsWith('Merge remote-tracking-branch'); if (!isMergeCommit && !releaseRE.test(msg) && !commitRE.test(msg)) { console.log(); + console.error( ` ${colors.bgRed(colors.white(' ERROR '))} ${colors.red( `invalid commit message format.` - )}\n\n` + - colors.red( - ` Proper commit message format is required for automated changelog generation. Examples:\n\n` - ) + - ` ${colors.green(`feat: add 'comments' option`)}\n` + - ` ${colors.green(`fix: handle events on blur (close #28)`)}\n\n` + - colors.red(` See .github/commit-convention.md for more details.\n`) + )} + + ${colors.red( + `Proper commit message format is required for automated changelog generation. Examples:` + )} + + ${colors.green(`feat: add 'comments' option`)} + ${colors.green(`fix: handle events on blur (close #28)`)} + + ${colors.red(`See .github/commit-convention.md for more details.`)} +` ); + process.exit(1); } |
