From 338ef3b1722ce46ed822db4a7d655df1aaeb4cf5 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Fri, 31 May 2024 07:05:02 -0400 Subject: [PATCH] chore(root): enforce commitlint only on master branch --- .husky/commit-msg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 0a4b97de..0c6f0794 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1,5 @@ -npx --no -- commitlint --edit $1 +branch="$(git rev-parse --abbrev-ref HEAD)" +if [ "$branch" = "master" ]; then + npx --no -- commitlint --edit $1 +fi +