Differential D18730 Diff 44962 src/applications/differential/editor/DifferentialTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialTransactionEditor.php
| Show First 20 Lines • Show All 1,531 Lines • ▼ Show 20 Lines | /* -( Herald Integration )------------------------------------------------- */ | ||||
| protected function didApplyTransactions($object, array $xactions) { | protected function didApplyTransactions($object, array $xactions) { | ||||
| // If a draft revision has no outstanding builds and we're automatically | // If a draft revision has no outstanding builds and we're automatically | ||||
| // making drafts public after builds finish, make the revision public. | // making drafts public after builds finish, make the revision public. | ||||
| $auto_undraft = true; | $auto_undraft = true; | ||||
| if ($object->isDraft() && $auto_undraft) { | if ($object->isDraft() && $auto_undraft) { | ||||
| $active_builds = $this->hasActiveBuilds($object); | $active_builds = $this->hasActiveBuilds($object); | ||||
| if (!$active_builds) { | if (!$active_builds) { | ||||
| // When Harbormaster moves a revision out of the draft state, we | |||||
| // attribute the action to the revision author since this is more | |||||
| // natural and more useful. | |||||
| $author_phid = $object->getAuthorPHID(); | |||||
| $xaction = $object->getApplicationTransactionTemplate() | $xaction = $object->getApplicationTransactionTemplate() | ||||
| ->setAuthorPHID($author_phid) | |||||
| ->setTransactionType( | ->setTransactionType( | ||||
| DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE) | DifferentialRevisionRequestReviewTransaction::TRANSACTIONTYPE) | ||||
| ->setOldValue(false) | ->setOldValue(false) | ||||
| ->setNewValue(true); | ->setNewValue(true); | ||||
| $xaction = $this->populateTransaction($object, $xaction); | $xaction = $this->populateTransaction($object, $xaction); | ||||
| // If we're creating this revision and immediately moving it out of | // If we're creating this revision and immediately moving it out of | ||||
| Show All 35 Lines | |||||