mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-16 08:26:16 +00:00
gha: Fix Body Line Length action flagging empty body commit messages
Change the Body Line Length workflow to not trigger when the commit message contains only a message without a body. Other workflows will flag the missing body sections, and it was confusing to have an error message that said 'Body line too long (max 150)' when this was not actually the case. Fixes: #5561 Co-authored-by: Jayant Singh <jayant.singh@intel.com> Co-authored-by: Luke Phillips <lucas.phillips@intel.com> Signed-off-by: Byron Marohn <byron.marohn@intel.com> Signed-off-by: Jayant Singh <jayant.singh@intel.com> Signed-off-by: Luke Phillips <lucas.phillips@intel.com> Signed-off-by: Kelby Madal-Hellmuth <kelby.madal-hellmuth@intel.com> Signed-off-by: Liz Lawrens <liz.lawrens@intel.com>
This commit is contained in:
parent
509bc8b6c8
commit
5226f15c84
5
.github/workflows/commit-message-check.yaml
vendored
5
.github/workflows/commit-message-check.yaml
vendored
@ -62,6 +62,9 @@ jobs:
|
|||||||
# to be specified at the start of the regex as the action is passed
|
# to be specified at the start of the regex as the action is passed
|
||||||
# the entire commit message.
|
# the entire commit message.
|
||||||
#
|
#
|
||||||
|
# - This check will pass if the commit message only contains a subject
|
||||||
|
# line, as other body message properties are enforced elsewhere.
|
||||||
|
#
|
||||||
# - Body lines *can* be longer than the maximum if they start
|
# - Body lines *can* be longer than the maximum if they start
|
||||||
# with a non-alphabetic character or if there is no whitespace in
|
# with a non-alphabetic character or if there is no whitespace in
|
||||||
# the line.
|
# the line.
|
||||||
@ -75,7 +78,7 @@ jobs:
|
|||||||
#
|
#
|
||||||
# - A SoB comment can be any length (as it is unreasonable to penalise
|
# - A SoB comment can be any length (as it is unreasonable to penalise
|
||||||
# people with long names/email addresses :)
|
# people with long names/email addresses :)
|
||||||
pattern: '^.+(\n([a-zA-Z].{0,150}|[^a-zA-Z\n].*|[^\s\n]*|Signed-off-by:.*|))+$'
|
pattern: '(^[^\n]+$|^.+(\n([a-zA-Z].{0,150}|[^a-zA-Z\n].*|[^\s\n]*|Signed-off-by:.*|))+$)'
|
||||||
error: 'Body line too long (max 150)'
|
error: 'Body line too long (max 150)'
|
||||||
post_error: ${{ env.error_msg }}
|
post_error: ${{ env.error_msg }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user