From e2c9c937b85f9652e657a4dddf72846298c6efdb Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 7 Jan 2021 18:50:51 +0300 Subject: [PATCH] refactor: correct githook and setup script --- .githooks/prepare-commit-msg | 3 ++- setup.sh | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg index df9f994b..3b321632 100755 --- a/.githooks/prepare-commit-msg +++ b/.githooks/prepare-commit-msg @@ -21,6 +21,7 @@ breaking_changes_message = 'If commit include Breaking changes use ! after type colored_breaking_changes_message = 'If commit include \033[91mBreaking changes\033[00m use \033[91m!\033[00m after type or scope:' breaking_changes_commit_pattern = ' type(scope)!: message | type!: message \n' +available_types_message = 'Available commit types:' available_commit_types = ['build: Changes that affect the build system or external dependencies', 'ci: Changes to our CI configuration files and scripts', 'docs: Documentation only changes', @@ -58,7 +59,7 @@ def print_error_message(): print_available_commit_types() def print_available_commit_types(): - print("Available commit types:") + print(available_types_message) for commit_type in available_commit_types: print(" - %s" %commit_type) diff --git a/setup.sh b/setup.sh index 36675721..d9376573 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,3 @@ -# Enable githooks -git config core.hooksPath .githooks -chmod +x .githooks \ No newline at end of file +# Configure githooks folder path +git config core.hooksPath .githooks \ No newline at end of file