From 433816cca2cd72c9ecbb458688c238d8cfe6149e Mon Sep 17 00:00:00 2001 From: Derek Lee Date: Wed, 29 Jun 2022 16:20:19 -0700 Subject: [PATCH] ci/cd: update check-commit-message Recently added check-commit-message to the tests repository. Minor changes were also made to action. For consistency's sake, copied changes over to here as well. tests - https://github.com/kata-containers/tests/pull/4878 Minor Changes: 1. Body length check is now 75 and consistent with guidelines 2. Lines without spaces are not counted in body length check Fixes #4559 Signed-off-by: Derek Lee --- .github/workflows/commit-message-check.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commit-message-check.yaml b/.github/workflows/commit-message-check.yaml index 2062e51b9c..fec12ac1dd 100644 --- a/.github/workflows/commit-message-check.yaml +++ b/.github/workflows/commit-message-check.yaml @@ -63,7 +63,8 @@ jobs: # the entire commit message. # # - Body lines *can* be longer than the maximum if they start - # with a non-alphabetic character. + # with a non-alphabetic character or if there is no whitespace in + # the line. # # This allows stack traces, log files snippets, emails, long URLs, # etc to be specified. Some of these naturally "work" as they start @@ -74,7 +75,7 @@ jobs: # # - A SoB comment can be any length (as it is unreasonable to penalise # people with long names/email addresses :) - pattern: '^.+(\n([a-zA-Z].{0,149}|[^a-zA-Z\n].*|Signed-off-by:.*|))+$' + pattern: '^.+(\n([a-zA-Z].{0,72}|[^a-zA-Z\n].*|[^\s\n]*|Signed-off-by:.*|))+$' error: 'Body line too long (max 72)' post_error: ${{ env.error_msg }}