Skip to content

Commit 45c3dcb

Browse files
committed
workflow: allow version number as commit message
1 parent 51d54db commit 45c3dcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/verifyCommitMsg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
const chalk = require('chalk')
1+
const chalk = require('chalk') // eslint-disable-line
22
const msgPath = process.env.GIT_PARAMS
33
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()
44

5-
const commitRE = /^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
5+
const commitRE = /^(v\d+\.\d+\.\d+(-(alpha|beta|rc.\d+))?$)|((revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50})/
66

77
if (!commitRE.test(msg)) {
88
console.log()

0 commit comments

Comments
 (0)