Differential D7923 Diff 17936 src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
Show All 36 Lines | private function applyHeraldRules( | ||||
if (!$data) { | if (!$data) { | ||||
throw new PhabricatorWorkerPermanentFailureException( | throw new PhabricatorWorkerPermanentFailureException( | ||||
pht( | pht( | ||||
'Unable to load commit data. The data for this task is invalid '. | 'Unable to load commit data. The data for this task is invalid '. | ||||
'or no longer exists.')); | 'or no longer exists.')); | ||||
} | } | ||||
$adapter = HeraldCommitAdapter::newLegacyAdapter( | $adapter = id(new HeraldCommitAdapter()) | ||||
$repository, | ->setCommit($commit); | ||||
$commit, | |||||
$data); | |||||
$rules = id(new HeraldRuleQuery()) | $rules = id(new HeraldRuleQuery()) | ||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
->withContentTypes(array($adapter->getAdapterContentType())) | ->withContentTypes(array($adapter->getAdapterContentType())) | ||||
->withDisabled(false) | ->withDisabled(false) | ||||
->needConditionsAndActions(true) | ->needConditionsAndActions(true) | ||||
->needAppliedToPHIDs(array($adapter->getPHID())) | ->needAppliedToPHIDs(array($adapter->getPHID())) | ||||
->needValidateAuthors(true) | ->needValidateAuthors(true) | ||||
▲ Show 20 Lines • Show All 393 Lines • Show Last 20 Lines |