Differential D21468 Diff 51098 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 61 Lines • ▼ Show 20 Lines | if ($data->getCommitDetail('holdReasons') !== $hold_reasons) { | ||||
| $data->setCommitDetail('holdReasons', $hold_reasons); | $data->setCommitDetail('holdReasons', $hold_reasons); | ||||
| $data->save(); | $data->save(); | ||||
| } | } | ||||
| if (!$should_publish) { | if (!$should_publish) { | ||||
| return; | return; | ||||
| } | } | ||||
| $this->applyTransactions($viewer, $repository, $commit); | // NOTE: Close revisions and tasks before applying transactions, because | ||||
| // we want a side effect of closure (the commit being associated with | |||||
| // a revision) to occur before a side effect of transactions (Herald | |||||
| // executing). The close methods queue tasks for the actual updates to | |||||
| // commits/revisions, so those won't occur until after the commit gets | |||||
| // transactions. | |||||
| $this->closeRevisions($viewer, $commit); | $this->closeRevisions($viewer, $commit); | ||||
| $this->closeTasks($viewer, $commit); | $this->closeTasks($viewer, $commit); | ||||
| $this->applyTransactions($viewer, $repository, $commit); | |||||
| } | } | ||||
| private function applyTransactions( | private function applyTransactions( | ||||
| PhabricatorUser $actor, | PhabricatorUser $actor, | ||||
| PhabricatorRepository $repository, | PhabricatorRepository $repository, | ||||
| PhabricatorRepositoryCommit $commit) { | PhabricatorRepositoryCommit $commit) { | ||||
| $xactions = array( | $xactions = array( | ||||
| ▲ Show 20 Lines • Show All 463 Lines • Show Last 20 Lines | |||||