From 4ea504e2dbfab2c0bda7f24882baa7ab2a92d916 Mon Sep 17 00:00:00 2001 From: mattsqd Date: Mon, 24 Apr 2023 14:42:37 -0400 Subject: [PATCH 1/2] fixes #4: Allow integer of any size for issue ID. --- robo.example.yml | 2 +- src/Robo/Plugin/Commands/ValidateCommands.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/robo.example.yml b/robo.example.yml index b5e104f..159ae74 100644 --- a/robo.example.yml +++ b/robo.example.yml @@ -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: diff --git a/src/Robo/Plugin/Commands/ValidateCommands.php b/src/Robo/Plugin/Commands/ValidateCommands.php index 7fe1579..1646ca3 100644 --- a/src/Robo/Plugin/Commands/ValidateCommands.php +++ b/src/Robo/Plugin/Commands/ValidateCommands.php @@ -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.', From adfc17767061008e29f466fe2ff4f7887a1a9ff0 Mon Sep 17 00:00:00 2001 From: mattsqd Date: Mon, 24 Apr 2023 14:43:39 -0400 Subject: [PATCH 2/2] fixes #4: Fixed grammatical errors in example robo file. --- robo.example.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robo.example.yml b/robo.example.yml index 159ae74..5bab978 100644 --- a/robo.example.yml +++ b/robo.example.yml @@ -5,9 +5,9 @@ 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' @@ -15,7 +15,7 @@ command: 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