chore(pr-checker): 允许使用“feat!”表示重大更新

This commit is contained in:
zzyyyl
2024-06-13 17:55:39 +08:00
parent 198043b865
commit 3d862ec61b

View File

@@ -39,7 +39,7 @@ jobs:
per_page: 100
});
const regex = /^((build|chore|ci|docs?|feat|fix|perf|refactor|rft|style|test|i18n|typo)[\:\.\(\,]|[Rr]evert|[Rr]elease)/;
const regex = /^((build|chore|ci|docs?|feat!?|fix|perf|refactor|rft|style|test|i18n|typo)[\:\.\(\,]|[Rr]evert|[Rr]elease)/;
const invalidCommits = commits.filter(commit => !regex.test(commit.commit.message) || commit.parents.length > 1);
console.log(`Checked ${commits.length} commit(s)`);