Regular Expressions 101

Gitlab push rule enforcing commits to follow the "Conventional Commit" specification (used for ex. in Angular ...)

Open Workspace
  • Golang
  • Match
0

Regular Expression

`
(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert)\([\w\-]+\):\s.*
`
gm

Description

More and more project use the "Conventional Commit" specification. As it allows some nice toolchain automations in projects you might want to enforce it in gitlab. May work in other git portals too

Submitted by Anonymous