Differential D10103 Diff 24332 src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/doorkeeper/DiffusionDoorkeeperCommitFeedStoryPublisher.php
| Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | $objects = id(new PhabricatorObjectQuery()) | ||||
| ->withPHIDs($auditor_phids) | ->withPHIDs($auditor_phids) | ||||
| ->execute(); | ->execute(); | ||||
| $active = array(); | $active = array(); | ||||
| $passive = array(); | $passive = array(); | ||||
| foreach ($requests as $request) { | foreach ($requests as $request) { | ||||
| $status = $request->getAuditStatus(); | $status = $request->getAuditStatus(); | ||||
| if ($status == PhabricatorAuditStatusConstants::CC) { | |||||
| // We handle these specially below. | |||||
| continue; | |||||
| } | |||||
| $object = idx($objects, $request->getAuditorPHID()); | $object = idx($objects, $request->getAuditorPHID()); | ||||
| if (!$object) { | if (!$object) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $request_phids = array(); | $request_phids = array(); | ||||
| if ($object instanceof PhabricatorUser) { | if ($object instanceof PhabricatorUser) { | ||||
| ▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | public function getActiveUserPHIDs($object) { | ||||
| return $this->activePHIDs; | return $this->activePHIDs; | ||||
| } | } | ||||
| public function getPassiveUserPHIDs($object) { | public function getPassiveUserPHIDs($object) { | ||||
| return $this->passivePHIDs; | return $this->passivePHIDs; | ||||
| } | } | ||||
| public function getCCUserPHIDs($object) { | public function getCCUserPHIDs($object) { | ||||
| $ccs = array(); | return PhabricatorSubscribersQuery::loadSubscribersForPHID( | ||||
| foreach ($this->getAuditRequests() as $request) { | $object->getPHID()); | ||||
| if ($request->getAuditStatus() == PhabricatorAuditStatusConstants::CC) { | |||||
| $ccs[] = $request->getAuditorPHID(); | |||||
| } | |||||
| } | |||||
| return $ccs; | |||||
| } | } | ||||
| public function getObjectTitle($object) { | public function getObjectTitle($object) { | ||||
| $prefix = $this->getTitlePrefix($object); | $prefix = $this->getTitlePrefix($object); | ||||
| $repository = $object->getRepository(); | $repository = $object->getRepository(); | ||||
| $name = $repository->formatCommitName($object->getCommitIdentifier()); | $name = $repository->formatCommitName($object->getCommitIdentifier()); | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||