From 4e6d55e4901ec2480928e5c494e5b66154511885 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 8 Mar 2021 07:58:19 +1300 Subject: [PATCH] ci: don't run git hooks when in ci --- .husky/commit-msg | 4 ++++ .husky/pre-commit | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.husky/commit-msg b/.husky/commit-msg index d71a03b9f..ed97cdcd7 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1,8 @@ #!/bin/sh + +# don't run checks against ci commits +[ -n "$CI" ] && exit 0 + . "$(dirname "$0")/_/husky.sh" yarn commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit index d2ae35e84..f5299445e 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,8 @@ #!/bin/sh + +# don't run checks against ci commits +[ -n "$CI" ] && exit 0 + . "$(dirname "$0")/_/husky.sh" yarn lint-staged