mirror of
https://github.com/hanzoai/o11y-design-tokens.git
synced 2026-11-03 02:07:51 +00:00
17 lines
321 B
Bash
Executable File
17 lines
321 B
Bash
Executable File
#!/usr/bin/env sh
|
|
. "$(dirname -- "$0")/_/husky.sh"
|
|
|
|
pnpm commitlint --edit $1
|
|
|
|
branch="$(git rev-parse --abbrev-ref HEAD)"
|
|
|
|
color_red="$(tput setaf 1)"
|
|
bold="$(tput bold)"
|
|
reset="$(tput sgr0)"
|
|
|
|
if [ "$branch" = "main" ]; then
|
|
echo "${color_red}${bold}You can't commit directly to the main branch${reset}"
|
|
exit 1
|
|
fi
|
|
|