Skip to content

Commit 892d50f

Browse files
GeorgeSapkinrobimarko
authored andcommitted
formal: fix checking for empty bodies
Commit bodies that consist of whitespace only shouldn't pass the test. Signed-off-by: George Sapkin <george@sapk.in>
1 parent 33f4fa0 commit 892d50f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/scripts/check_formalities.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ check_body() {
194194
status_pass '`Signed-off-by` email is not a GitHub noreply email'
195195
fi
196196

197-
if echo "$body" | grep -qv "Signed-off-by:"; then
197+
if echo "$body" | grep -v "Signed-off-by:" | grep -qv '^[[:space:]]*$'; then
198198
status_pass 'A commit message exists'
199199
else
200200
output_fail 'Commit message is missing. Please describe your changes.'

0 commit comments

Comments
 (0)