Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1007 Bytes

git_commit_message.md

File metadata and controls

56 lines (37 loc) · 1007 Bytes

Git commit message

The git comit message can be used in combination with the git hook git:commit-msg. It can be used to enforce patterns in a commit message. For example: if you are working with JIRA, it is possible to add a pattern for the JIRA issue number.

# grumphp.yml
parameters:
    tasks:
        git_commit_message:
            matchers:
                - /JIRA-([0-9]*)/
            case_insensitive: true
            multiline: true
            additional_modifiers: ''

matchers

Default: []

Use this parameter to specify one or multiple patterns. The value can be in regex or glob style. Here are some example matchers:

  • /JIRA-([0-9]*)/
  • pre-fix*
  • *suffix
  • ...

case_insensitive

Default: true

Mark the matchers as case sensitive.

multiline

Default:true

Mark the matchers as multiline.

additional_modifiers

Default: ''

Add one or multiple additional modifiers like:

additional_modifiers: 'u'

# or

additional_modifiers: 'xu'