From 026a51e62fafe5391d3c9b1320ae33f76ea0d961 Mon Sep 17 00:00:00 2001 From: BeADre Date: Fri, 22 Mar 2024 15:09:16 +0800 Subject: [PATCH] feat(commitLint): add merge and wip type (#5) --- .gitignore | 1 + src/commitLint.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f06235c..82ee25a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules dist +.idea diff --git a/src/commitLint.ts b/src/commitLint.ts index f495177..8641c40 100644 --- a/src/commitLint.ts +++ b/src/commitLint.ts @@ -5,7 +5,7 @@ import fse from 'fs-extra' const { readFileSync } = fse export const COMMIT_MESSAGE_RE = - /^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor)(\(.+\))?!?: (.|\n)+/ + /^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor|merge|wip)(\(.+\))?!?: (.|\n)+/ const ERROR_MESSAGE = 'Commit message invalid.' const WARNING_MESSAGE = `\ @@ -35,6 +35,8 @@ Allowed types: - release - refactor - revert +- merge +- wip Commit message reference: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y 参考阮一峰Commit message编写指南: https://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html`