Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rules): handle blank commit message in signed-off-by rule #4124

Merged
merged 1 commit into from
Aug 28, 2024
Merged

fix(rules): handle blank commit message in signed-off-by rule #4124

merged 1 commit into from
Aug 28, 2024

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>
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
7 checks passed
@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
Development

Successfully merging this pull request may close these issues.

2 participants