Skip to content

Commit

Permalink
Extracted issue regex into configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
phpfour committed Jul 23, 2017
1 parent 5e7f681 commit d20249e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/release-notes.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
'issue_tracker' => [
'type' => 'jira',
'host' => env('JIRA_URL', 'https://project.atlassian.net'),
'username' => env('JIRA_USERNAME', 'emran'),
'username' => env('JIRA_USERNAME', 'user'),
'password' => env('JIRA_PASSWORD', 'secret'),
'regex' => env('JIRA_ISSUE_REGEX', '/GT-[\d]+/'),
],

];
2 changes: 1 addition & 1 deletion src/IssueTracker/Jira.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct($config = [])

public function getIssueRegex()
{
return '/GT-[\d]+/';
return $this->config['regex'];
}

public function getIssueURL($identifier)
Expand Down

0 comments on commit d20249e

Please sign in to comment.