First install the package:
npm install branch-check-cli --save-dev
This package script contains a couple different ways to define what is considered a valid branch name. Also feel free to use the shorthands defined in, branch-check" --help
-
Regex Fuzzy Matching
$ branch-check" --match 'refactor/ feature/ bug/'
-
Directory Matching
$ branch-check" --dir '*/*'