Skip to content

Commit

Permalink
fix: 告警提示有中locale, 给正则也加上 (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaier33 committed May 6, 2021
1 parent 79cd8c4 commit e09bba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/verifyCommit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const osLocale = require('os-locale');
const msgPath = process.env.GIT_PARAMS;
const msg = require('fs').readFileSync(msgPath, 'utf-8').trim();

const commitRE = /^(((\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55]) )?(revert: )?(feat|fix|docs|UI|refactor|⚡perf|workflow|build|CI|typos|chore|tests|types|wip|release|dep)(\(.+\))?: .{1,50}/;
const commitRE = /^(((\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55]) )?(revert: )?(feat|fix|docs|UI|refactor|⚡perf|workflow|build|CI|typos|chore|tests|types|wip|release|dep|locale)(\(.+\))?: .{1,50}/;

if (!commitRE.test(msg)) {
console.log();
Expand Down

0 comments on commit e09bba8

Please sign in to comment.