Skip to content

Conversation

@SetDefaultOne
Copy link
Contributor

Check for an empty commit message for rule signed-off-by.

Description

On a minimal environment with only commitlint installed and the signed-off-by rule set, writing an empty commit message would result in a runtime exception.

Motivation and Context

Previously this rule caused a runtime exception trying to validate an empty commit message as it was trying to access the startsWith string method on an undefined value which was supposed to store the last line of the commit message. Now it does a check to see if the last line is undefined or not.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have added tests to cover my changes.
  • All new and existing tests passed.
Signed-off-by: Default One <setdefaultone@gmail.com>
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@escapedcat
Copy link
Member

Thanks!

@escapedcat escapedcat merged commit 7ab4bab into conventional-changelog:master Aug 28, 2024
@escapedcat
Copy link
Member

Had some issues during the publish but version 19.4.1 should work for you. Give it a try.

@SetDefaultOne
Copy link
Contributor Author

Had some issues during the publish but version 19.4.1 should work for you. Give it a try.

Thanks. I've already set up v19.4.1 and it's working as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants