On this page
article
Commit
Commit messages validation configuration.
Optional
changes check uses conventional commit by default.
Empty changes.yaml or no file - valid.
commit:
# Commit message format for subject validation
subject: '(issue): (type)? (title)'
# values extracted from commit message
values:
issue:
regexp: ^TEAM-\d+$
Subject format
commit.subject - simplified regexp for subject validation.
Examples
(!)?(type)((context))?: (title)- conventional commit with optional context and!!feat: somethingfix(ci): something
(issue): (title)- simple Jira/Basecamp/GitHub issue,:and titleCMD-123: something#123: something
(issue): (type)? (title)- previous format with optionaltypekeyword#123: somethingCMD-123: Fix something
Notation
()brackets - declaration for a value symbols group. Name inside brackets - value name.?question symbol - group becomes optional.(([(^_approved_^)]))- symbols inside brackets except letters treated as not value symbols, other brackets too.
Values
Values validation customization. You can add new values or override existed.
Goals
- Split giant regexp into parts for simplicity.
- Commit value names used in custom validation functions and changelog generator.
Defaults
values:
type:
allowed: [ feat, fix ]
title:
regexp: "^[\w]+$"
max-len: 20
context:
regexp: "^[a-z-_]+$"
max-len: 10
issue:
regexp: "^#\d+$"
max-len: 5
Structure
values.{{value-name}}.alloved- list of allowed strings for this valuevalues.{{value-name}}.max-len- length limitvalues.{{value-name}}.regexp- value regular expression,^and$required to match full string