Skip to content

Commit cbb46e7

Browse files
committed
ci: 修改 git hooks commit-msg,改为取第一行
1 parent eaf1479 commit cbb46e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/git-hooks/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# 获取提交信息
33
commit_msg_file=$(git rev-parse --git-dir)/COMMIT_EDITMSG
4-
commit_msg=$(cat ${commit_msg_file})
4+
commit_msg=$(head -n 1 ${commit_msg_file})
55
# 使用正则匹配 Angular 提交日志格式
66
regex="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|wip|workflow|release)(\(.+\))?: .{1,72}$"
77

0 commit comments

Comments
 (0)