From 6267546f0cb5292e4803fcdf6f35f3ac038e974d Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Wed, 9 Nov 2022 11:50:37 +0100 Subject: [PATCH] Add brackets to the issue number --- home-manager/software/git/hooks/prepare-commit-msg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-manager/software/git/hooks/prepare-commit-msg b/home-manager/software/git/hooks/prepare-commit-msg index 551daad..e7ae7f8 100755 --- a/home-manager/software/git/hooks/prepare-commit-msg +++ b/home-manager/software/git/hooks/prepare-commit-msg @@ -12,7 +12,7 @@ issueId=$(echo $branchName | sed -nE 's,([A-Z]?-?[0-9]+)-.+,\1,p') if [[ ! -z $issueId ]]; then # $1 is the name of the file containing the commit message # sed -i.bak -e "1s/^/\n\n[$issueId]\n/" $1 - echo -e "#$issueId ""$(cat $1)" > "$1" + echo -e "[#$issueId] ""$(cat $1)" > "$1" # echo -e "[$issueId]\n""$(cat $1)" > "$1" # sed -i.bak -e "1s/^/$TRIMMED /" $1 fi