compilerla / conventional-pre-commit

A pre-commit hook that checks commit messages for Conventional Commits formatting
Apache License 2.0
346 stars 58 forks source link

Commit Message Capitalisation #108

Closed mikejwhat closed 2 weeks ago

mikejwhat commented 2 months ago

My colleagues and I are finding it slightly frustrating that commit messages generated by GitHub Copilot are not accepted by this hook.

For example, I will be pulled up on the auto-generated commit message below due to the capital 'A' after the colon.

image

This seems to be at odds with the conventional commit specification:

15. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.

Can we change this or at least have the ability to opt out of case checking?

thekaveman commented 2 months ago

Thanks @mikejwhat

Just looking quickly at the regex for that section of the commit message (called the subject):

r" .+$"

I'm not seeing anything where a capital letter (or really any character) would be a problem.

Are you sure that is the source of the hook failure?

thekaveman commented 2 weeks ago

Please let us know if you continue to see this issue.