Skip to content

Commit

Permalink
workflow: allow release commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jun 21, 2020
1 parent fef8eb7 commit 5e0aa24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/verifyCommit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ const chalk = require('chalk')
const msgPath = process.env.GIT_PARAMS
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()

const releaseRE = /^v\d/
const commitRE = /^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release): .{1,50}/

if (!commitRE.test(msg)) {
if (!releaseRE.test(msg) && !commitRE.test(msg)) {
console.log()
console.error(
` ${chalk.bgRed.white(' ERROR ')} ${chalk.red(
Expand Down

0 comments on commit 5e0aa24

Please sign in to comment.