mirror of
https://gitee.com/devlive-community/datacap.git
synced 2024-12-05 05:27:52 +08:00
15 lines
635 B
Bash
15 lines
635 B
Bash
#!/bin/sh
|
||
|
||
commit_msg=$(cat "$1")
|
||
|
||
email=$(git config user.email)
|
||
msg_re="^(\[Feature\]|\[Fix\]|\[Docs\]|\[Refactor\]|\[Test\]|\[Workflow\]|\[Build\]|\[Ci\]|\[Env\]|\[Release\]|\[Api\]|\[Web\]|\[Core\]|\[Spi\]|\[Plugin\]|\[Client\])(\(.+\))? .{1,100}"
|
||
|
||
if [[ ! $commit_msg =~ $msg_re ]]; then
|
||
printf "Invalid commit message submission format. Please use the correct format:\
|
||
\n [Feature]|[Fix]|[Docs]|[Refactor]|[Test]|[Workflow]|[Build]|[Ci]|[Env]|[Release]|[Api]|[Web]|[Core]|[Spi]|[Plugin] \
|
||
\n [Feature]: Add comments \
|
||
\n [Fix]: Handle events on blur (close #28) %s"
|
||
exit 1
|
||
fi
|