From 4b0d57812b9c75cd8d4971edd2323ff5a55c2b4f Mon Sep 17 00:00:00 2001 From: kukko Date: Wed, 21 Aug 2024 15:47:11 +0200 Subject: [PATCH] fix(husky): do not check commit messages written by semantic-release --- .husky/commit-msg | 6 +++++- .husky/prepare-commit-msg | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 3434a33..6dd3628 100644 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1 +1,5 @@ -pnpx commitlint --edit \ No newline at end of file +#!/bin/sh + +if [ "$GITHUB_ACTIONS" != "true" ]; then + pnpx commitlint --edit +fi \ No newline at end of file diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg index a4fe23c..473afbe 100755 --- a/.husky/prepare-commit-msg +++ b/.husky/prepare-commit-msg @@ -1,5 +1,5 @@ #!/bin/sh -if [ "$GITHUB_ACTIONS" = "false" ] && sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then +if [ "$GITHUB_ACTIONS" != "true" ] && sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then exec < /dev/tty && pnpx cz --hook || true fi