mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-04 00:20:42 +08:00
16 lines
328 B
Bash
Executable File
16 lines
328 B
Bash
Executable File
#!/bin/sh
|
|
. "$(dirname "$0")/_/husky.sh"
|
|
|
|
cd frontend && yarn run 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
|