We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2b192f3 + e7785d6 commit 58459fcCopy full SHA for 58459fc
check_message.sh
@@ -31,7 +31,8 @@ then
31
exit
32
fi
33
34
-MESSAGE=$(<"$1")
+# removing comment lines from message
35
+MESSAGE=$(sed '/^#/d' "$1")
36
37
FIRST_WORD=${MESSAGE%% *}
38
if [[ "${FIRST_WORD,,}" == merge ]]
@@ -44,6 +45,6 @@ fi
44
45
# print message so you don't lose it in case of errors
46
# (in case you are not using `-m` option)
47
echo "Options: JIRA=$COMMIT_VALIDATOR_NO_JIRA, TEMP=$COMMIT_VALIDATOR_ALLOW_TEMP"
-printf "checking commit message:\n\n#BEGIN#\n%s\n#END#\n\n" "$(grep -v "#" <<< "$MESSAGE")"
48
+printf "checking commit message:\n\n#BEGIN#\n%s\n#END#\n\n" "$MESSAGE"
49
50
validate "$MESSAGE"
0 commit comments