Open AlfieriChou opened 2 years ago
#!/bin/sh npm run lint exitCode="$?" exit $exitCode
#!/bin/sh commit_msg=`cat $1` email=`git config user.email` msg_re="^(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|release|workflow)(\(.+\))?: .{1,100}" if [[ ! $commit_msg =~ $msg_re ]] then echo "不合法的 commit 消息提交格式,请使用正确的格式:" echo "feat: add comments" echo "fix: handle events on blur (close #28)" exit 1 fi email_re="@qq\.com" if [[ ! $email =~ $email_re ]] then echo "此用户没有权限,具有权限的用户为: xxx@qq.com" exit 1 fi