mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
phabot pickup repository objects
Test Plan: <dctrwatson> rP <phabot> rP (Phabricator) - https://secure.phabricator.com/diffusion/P/ Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8101
This commit is contained in:
parent
08225bd860
commit
22ccb037b9
1 changed files with 6 additions and 2 deletions
|
@ -83,12 +83,16 @@ final class PhabricatorBotObjectNameHandler extends PhabricatorBotHandler {
|
|||
$pattern =
|
||||
'@'.
|
||||
'(?<!/)(?:^|\b)'.
|
||||
'(r[A-Z]+[0-9a-z]{1,40})'.
|
||||
'(r[A-Z]+)([0-9a-z]{0,40})'.
|
||||
'(?:\b|$)'.
|
||||
'@';
|
||||
if (preg_match_all($pattern, $message, $matches, PREG_SET_ORDER)) {
|
||||
foreach ($matches as $match) {
|
||||
$commit_names[] = $match[1];
|
||||
if ($match[2]) {
|
||||
$commit_names[] = $match[1].$match[2];
|
||||
} else {
|
||||
$object_names[] = $match[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue