Files
monie-backend/.husky/pre-push
Denis Krylov 9ed1fe84a1
Some checks failed
Commit Message Check / conventional-commits (pull_request) Failing after 3s
Deploy monie-backend to dev (kaniko) / build-and-deploy (pull_request) Successful in 0s
Deploy monie-backend (kaniko) / build-and-deploy (pull_request) Successful in 0s
chore: setup commitlint and git hooks
2026-04-05 00:24:01 +03:00

20 lines
447 B
Bash
Executable File

#!/usr/bin/env sh
branch="$(git rev-parse --abbrev-ref HEAD)"
case "$branch" in
main|develop)
echo "Direct pushes to $branch are not allowed."
echo "Please create a feature/... or bugfix/... branch and open a PR/MR."
exit 1
;;
feature/*|bugfix/*|hotfix/*|chore/*)
exit 0
;;
*)
echo "Invalid branch name: $branch"
echo "Allowed branch prefixes: feature/*, bugfix/*, hotfix/*, chore/*"
exit 1
;;
esac