From f0a5fec86649d893251c64256259eb4f9abeaa1f Mon Sep 17 00:00:00 2001 From: shaodahong Date: Mon, 15 Jun 2020 15:34:06 +0800 Subject: [PATCH] ci: verify commit msg --- scripts/verify-commit-msg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verify-commit-msg.js b/scripts/verify-commit-msg.js index 59b2255f..ddaa01f0 100644 --- a/scripts/verify-commit-msg.js +++ b/scripts/verify-commit-msg.js @@ -5,7 +5,7 @@ const msg = require('fs').readFileSync(msgPath, 'utf-8').trim() const commitRE = /^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build|v)(\(.+\))?: .{1,50}/ -if (!commitRE.test(msg)) { +if (!/^v\d+\.\d+\.\d+/.test(msg) && !commitRE.test(msg)) { console.log() console.error(` ${chalk.bgRed.white(' ERROR ')} 无效的提交信息`) process.exit(1)