Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/herald/DiffusionAuditorsHeraldAction.php
Show All 12 Lines | public function supportsObject($object) { | ||||
return ($object instanceof PhabricatorRepositoryCommit); | return ($object instanceof PhabricatorRepositoryCommit); | ||||
} | } | ||||
protected function applyAuditors(array $phids, HeraldRule $rule) { | protected function applyAuditors(array $phids, HeraldRule $rule) { | ||||
$adapter = $this->getAdapter(); | $adapter = $this->getAdapter(); | ||||
$object = $adapter->getObject(); | $object = $adapter->getObject(); | ||||
$auditors = $object->getAudits(); | $auditors = $object->getAudits(); | ||||
$auditors = mpull($auditors, null, 'getAuditorPHID'); | |||||
$current = array_keys($auditors); | $current = array(); | ||||
foreach ($auditors as $auditor) { | |||||
if ($auditor->isInteresting()) { | |||||
$current[] = $auditor->getAuditorPHID(); | |||||
} | |||||
} | |||||
$allowed_types = array( | $allowed_types = array( | ||||
PhabricatorPeopleUserPHIDType::TYPECONST, | PhabricatorPeopleUserPHIDType::TYPECONST, | ||||
PhabricatorProjectProjectPHIDType::TYPECONST, | PhabricatorProjectProjectPHIDType::TYPECONST, | ||||
PhabricatorOwnersPackagePHIDType::TYPECONST, | PhabricatorOwnersPackagePHIDType::TYPECONST, | ||||
); | ); | ||||
$targets = $this->loadStandardTargets($phids, $allowed_types, $current); | $targets = $this->loadStandardTargets($phids, $allowed_types, $current); | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |