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
This commit is contained in:
Haoqun Jiang
2019-04-17 12:59:36 +08:00
parent f6c9437999
commit f09722cb1c

View File

@@ -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()