Regular Expressions 101

Community Patterns

1...34567...589

GIT commit title naming convention (strict), conforms to Conventional Commits

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(((I|i)nitial|(F|f)irst)\scommit)|((I|i)nit)$|^(?=.{6,72}$)(feat|(bug|hot)?fix|docs|perf|style|wip|test|revert|chore|ci|refactor|build)(\([a-zA-Z0-9\-\s,]{1,50}\))?:\s(.{1,50})$
/
gm

Description

GIT commit title naming convention (strict), conforms to Conventional Commits (https://www.conventionalcommits.org/en/v1.0.0/)

Submitted by hexrw - 4 months ago