Skip to content

Commit

Permalink
Merge pull request #5 from mattsqd/feature/4-commit-message-issue-length
Browse files Browse the repository at this point in the history
resolves #4 commit message issue length
  • Loading branch information
mattsqd authored Apr 24, 2023
2 parents ac37b55 + adfc177 commit b654715
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions robo.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ command:
options:
# This is used as a token replacement. It is most useful for 'pattern' so
# you can ensure that commit and branch names have a issue number in them
# so that Jira, Github, or Gitlab know which commits and branches belong
# so that Jira, GitHub, or Gitlab know which commits and branches belong
# to which issue.
# For example, if you bitbucket issue was XZY-1234, you canmake project-id
# For example, if you bitbucket issue was XZY-1234, you can make project-id
# XYZ.
project-id: ''
# Used in 'validate:coding-standards'
# Requires https://github.com/squizlabs/PHP_CodeSniffer be installed.
coding-standards:
options:
# This is initially configured for Drupal. However, this can be any PHPCS standard.
# Individual PHPCS commands cannot use more than one standar, so this will cause
# Individual PHPCS commands cannot use more than one standard, so this will cause
# the same command to be run for each standard for each path.
standards:
- Drupal
Expand Down Expand Up @@ -60,7 +60,7 @@ command:
# The regular expression that much match for all commits not in 'target-branch'.
# Note how {$project_id} is not part of the pattern but replaced with whatever is
# in 'project-id' before the regular expression is used.
pattern: '/^{$project_id}-(\d{4}): /'
pattern: '/^{$project_id}-(\d+): /'
# These next two describe how the commits should be formed.
short-help: 'Commit messages must start with: ''{$project_id}-x:y'''
long-help:
Expand Down
2 changes: 1 addition & 1 deletion src/Robo/Plugin/Commands/ValidateCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ public function validateCommitMessages(
'project-id' => '',
'target-branch' => 'develop',
'git-remote' => 'origin',
'pattern' => '/^{$project_id}-(\d{4}): /',
'pattern' => '/^{$project_id}-(\d+): /',
'short-help' => 'Commit messages must start with: \'{$project_id}-x:y\'',
'long-help' => [
'Where x is the ticket number.',
Expand Down

0 comments on commit b654715

Please sign in to comment.