branch="$(git rev-parse --abbrev-ref HEAD)" if [ "$branch" = "master" ]; then npx --no -- commitlint --edit $1 fi