From f09722cb1ce7011a6cecc853d278cd7820af0c3c Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Wed, 17 Apr 2019 12:59:36 +0800 Subject: [PATCH] workflow: allow `!` for indicating breaking changes in commit mesasge header This was introduced in conventional-commits 1.0.0-beta.4 https://github.com/conventional-commits/conventionalcommits.org/pull/134 --- scripts/verifyCommitMsg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verifyCommitMsg.js b/scripts/verifyCommitMsg.js index 2c2f58707..abe0cff39 100644 --- a/scripts/verifyCommitMsg.js +++ b/scripts/verifyCommitMsg.js @@ -2,7 +2,7 @@ const chalk = require('chalk') // eslint-disable-line const msgPath = process.env.GIT_PARAMS const msg = require('fs').readFileSync(msgPath, 'utf-8').trim() -const commitRE = /^(v\d+\.\d+\.\d+(-(alpha|beta|rc.\d+))?$)|((revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50})/ +const commitRE = /^(v\d+\.\d+\.\d+(-(alpha|beta|rc.\d+))?$)|((revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?!?: .{1,50})/ if (!commitRE.test(msg)) { console.log()