Differential D8473 Diff 20125 src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | private function createAuditsFromCommitMessage( | ||||
$message = $data->getCommitMessage(); | $message = $data->getCommitMessage(); | ||||
$matches = null; | $matches = null; | ||||
if (!preg_match('/^Auditors:\s*(.*)$/im', $message, $matches)) { | if (!preg_match('/^Auditors:\s*(.*)$/im', $message, $matches)) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$phids = DifferentialFieldSpecification::parseCommitMessageObjectList( | $phids = id(new PhabricatorObjectListQuery()) | ||||
$matches[1], | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
$include_mailables = false, | ->setAllowPartialResults(true) | ||||
$allow_partial = true); | ->setAllowedTypes( | ||||
array( | |||||
PhabricatorPeoplePHIDTypeUser::TYPECONST, | |||||
PhabricatorProjectPHIDTypeProject::TYPECONST, | |||||
)) | |||||
->setObjectList($matches[1]) | |||||
->execute(); | |||||
if (!$phids) { | if (!$phids) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$requests = id(new PhabricatorRepositoryAuditRequest())->loadAllWhere( | $requests = id(new PhabricatorRepositoryAuditRequest())->loadAllWhere( | ||||
'commitPHID = %s', | 'commitPHID = %s', | ||||
$commit->getPHID()); | $commit->getPHID()); | ||||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |