From 7da317a5817f49ac580be8c4e0c2fb7b19fbb960 Mon Sep 17 00:00:00 2001 From: ant-workaholic Date: Wed, 5 Jul 2017 17:48:09 +0300 Subject: [PATCH] Fixed #92: Issue duplicated in description. - Fixed logic pattern group issue. --- src/lib/PreCommit/Filter/ShortCommitMsg/Parser/Jira.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/PreCommit/Filter/ShortCommitMsg/Parser/Jira.php b/src/lib/PreCommit/Filter/ShortCommitMsg/Parser/Jira.php index 750a4dd..34f94b9 100644 --- a/src/lib/PreCommit/Filter/ShortCommitMsg/Parser/Jira.php +++ b/src/lib/PreCommit/Filter/ShortCommitMsg/Parser/Jira.php @@ -289,11 +289,8 @@ protected function interpretShortMessage($message) //endregion $userMessage = null; - if ($m) { - $userMessage = trim(array_pop($m)); - if (is_numeric($userMessage)) { - $userMessage = ""; - } + if ($m && isset($m[6])) { + $userMessage = $m[6]; } return [$commitVerb, $issueKey, $userMessage];