tommarshall / git-good-commit

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

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

Open ahmubashshir opened 3 years ago

ahmubashshir commented 3 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.