tommarshall / git-good-commit

Git hook to help you write good commit messages, with no external dependencies.
MIT License
193 stars 33 forks source link

hook: Allow tag:/[tag]/{tag} prefixes in subject #37

Open ahmubashshir opened 2 years ago

ahmubashshir commented 2 years ago

This hook didn't detect cap'd subject when prefixed with tag:/[tag]/{tag} eg.

tag(scope): Subject cap check failed
[tag] Subject cap check failed
{tag} Subject cap check failed

@(+([[:alnum:]])?(\(+([[:alnum:]])\)):|\[+([[:alnum:][:punct:]])\]|\{+([[:alnum:][:punct:]])\}|squash\!) matches the prefixes and removes it from subject line before checking.