From 7d707dad27d954d8e010116ae0a503a219c4a155 Mon Sep 17 00:00:00 2001 From: MorganGeek Date: Mon, 6 Jul 2020 16:43:26 +0200 Subject: [PATCH] don't enable pre-commit hooks on collibra repos --- dot_zsh_functions | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dot_zsh_functions b/dot_zsh_functions index 6fe0b9b..c6f4791 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -268,7 +268,7 @@ function vimat { } function copyhooks { cp -f ~/.git-template/.pre-commit-config.yaml ./ - pre-commit install --install-hooks --overwrite + pre-commit install --install-hooks --overwrite --allow-missing-config pre-commit run -a } function httperr { @@ -330,7 +330,9 @@ function vaultgetsecret { function setorigin { gra origin "$1" 2>/dev/null grset origin "$1" - copyhooks + if [[ $string =~ "collibra" ]]; then + copyhooks + fi } function gitpushallremote { grv @@ -346,7 +348,9 @@ function clone { if gcls "$1"; then if [[ -n "$folder" ]]; then cd "$folder" || exit - copyhooks + if [[ $string =~ "collibra" ]]; then + copyhooks + fi else error "unable to change current directory to : $folder" fi