1
0
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:
142vip.cn
2025-05-12 19:25:32 +08:00
committed by GitHub
parent 237b3abded
commit 3878a438b0
4 changed files with 23 additions and 3 deletions

15
scripts/core/verify-commit.ts Executable file
View 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()