Differential D20468 Diff 48875 src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/worker/PhabricatorRepositoryCommitPublishWorker.php
| Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | private function newAuditTransactions(PhabricatorRepositoryCommit $commit) { | ||||
| if (!$affected_packages) { | if (!$affected_packages) { | ||||
| return array(); | return array(); | ||||
| } | } | ||||
| $data = $commit->getCommitData(); | $data = $commit->getCommitData(); | ||||
| $author_phid = $data->getCommitDetail('authorPHID'); | $author_phid = $data->getCommitDetail('authorPHID'); | ||||
| $revision_id = $data->getCommitDetail('differential.revisionID'); | |||||
| if ($revision_id) { | $revision = DiffusionCommitRevisionQuery::loadRevisionForCommit( | ||||
| $revision = id(new DifferentialRevisionQuery()) | $viewer, | ||||
| ->setViewer($viewer) | $commit); | ||||
| ->withIDs(array($revision_id)) | |||||
| ->needReviewers(true) | |||||
| ->executeOne(); | |||||
| } else { | |||||
| $revision = null; | |||||
| } | |||||
| $requests = $commit->getAudits(); | $requests = $commit->getAudits(); | ||||
| $requests = mpull($requests, null, 'getAuditorPHID'); | $requests = mpull($requests, null, 'getAuditorPHID'); | ||||
| $auditor_phids = array(); | $auditor_phids = array(); | ||||
| foreach ($affected_packages as $package) { | foreach ($affected_packages as $package) { | ||||
| $request = idx($requests, $package->getPHID()); | $request = idx($requests, $package->getPHID()); | ||||
| if ($request) { | if ($request) { | ||||
| ▲ Show 20 Lines • Show All 223 Lines • Show Last 20 Lines | |||||