GsActions / commit-message-checker

GitHub Action that checks commit messages of pushes and pull request against a regex pattern
MIT License
99 stars 56 forks source link

[FEATURE] Add `failOnMatch` option #93

Open happycollision opened 1 year ago

happycollision commented 1 year ago

This option, when "true" will fail the checker when the given pattern matches the commit message. This allows for a simpler kind check for negative conditions such as "The commit message does not start with 'fixup'."

I rewrote some test cases here so that they were grouped into input types. This allowed me to use the same inputs for both the default settings and also the failOnMatch setting. Each of the "default" tests are exactly the same as they were before, with the "via failOnMatch" tests being the tests that were actually added.

Resolves #92