From b5fd94b3697b21a5ef863184dac31e014a4b895d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 26 Aug 2023 23:42:17 +0100 Subject: [PATCH] refactor(git-hooks): move description text --- templates/git-hooks/prepare-commit-msg.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/git-hooks/prepare-commit-msg.twig b/templates/git-hooks/prepare-commit-msg.twig index fbb6b36..b7eeb2d 100755 --- a/templates/git-hooks/prepare-commit-msg.twig +++ b/templates/git-hooks/prepare-commit-msg.twig @@ -2,8 +2,6 @@ # {{ managedText }} -set -euo pipefail - # Load the issue ID from an `.issue-id` file within the project and replace the # `ISSUE_ID` placeholder within a Git commit message. # @@ -13,6 +11,8 @@ set -euo pipefail # This also works with multiple issue IDs in the same string, e.g. # "OD-123 OD-456". +set -euo pipefail + PROJECT_DIR=$(git rev-parse --show-toplevel) # Get the root directory of the repo ISSUE_FILE="$PROJECT_DIR/.issue-id"