Skip to content

Commit

Permalink
#13 Implement integration with GitHub
Browse files Browse the repository at this point in the history
 - Added method for normalizing issue key.
  • Loading branch information
andkirby committed Dec 1, 2015
1 parent ec249e6 commit dee2232
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions LibHooks/lib/PreCommit/Filter/ShortCommitMsg/GitHub/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,17 @@ class Parser
extends ShortCommitMsg\Jira\Parser
implements InterpreterInterface
{
/**
* Convert issue number to issue key
*
* Add project key to issue number when it did not set.
*
* @param string $issueNo
* @return string
* @throws \PreCommit\Exception
*/
protected function _normalizeIssueKey($issueNo)
{
return "#" . ltrim($issueNo, '#');
}
}

0 comments on commit dee2232

Please sign in to comment.