Differential D20465 Diff 48839 src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryPushMailWorker.php
Show All 16 Lines | protected function doWork() { | ||||
$event_phid = idx($task_data, 'eventPHID'); | $event_phid = idx($task_data, 'eventPHID'); | ||||
$event = id(new PhabricatorRepositoryPushEventQuery()) | $event = id(new PhabricatorRepositoryPushEventQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withPHIDs(array($event_phid)) | ->withPHIDs(array($event_phid)) | ||||
->needLogs(true) | ->needLogs(true) | ||||
->executeOne(); | ->executeOne(); | ||||
$repository = $event->getRepository(); | $repository = $event->getRepository(); | ||||
if (!$repository->shouldPublish()) { | |||||
$publisher = $repository->newPublisher(); | |||||
if (!$publisher->shouldPublishRepository()) { | |||||
// If the repository is still importing, don't send email. | // If the repository is still importing, don't send email. | ||||
return; | return; | ||||
} | } | ||||
$targets = id(new PhabricatorRepositoryPushReplyHandler()) | $targets = id(new PhabricatorRepositoryPushReplyHandler()) | ||||
->setMailReceiver($repository) | ->setMailReceiver($repository) | ||||
->getMailTargets($email_phids, array()); | ->getMailTargets($email_phids, array()); | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |