mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-07-09 08:36:10 +08:00
feat: 引入@142vip/commit-linter依赖,增加check:commit命令,校验commit信息 (#147)
This commit is contained in:
15
scripts/core/verify-commit.ts
Executable file
15
scripts/core/verify-commit.ts
Executable file
@@ -0,0 +1,15 @@
|
||||
import { commitLiner } from '@142vip/commit-linter'
|
||||
import { VipColor, VipConsole, vipLogger } from '@142vip/utils'
|
||||
|
||||
/**
|
||||
* 验证Git Commit信息
|
||||
*/
|
||||
async function verifyCommitMain(): Promise<void> {
|
||||
const { type, scope, subject, commit } = commitLiner()
|
||||
|
||||
// 提交符合规范,打印相关信息
|
||||
VipConsole.log(`type: ${type}, scope: ${scope}, subject: ${subject}`)
|
||||
vipLogger.logByBlank(`${VipColor.greenBright('Git Commit: ')} ${VipColor.green(commit)}`)
|
||||
}
|
||||
|
||||
void verifyCommitMain()
|
||||
Reference in New Issue
Block a user