Differential D21710 Diff 51724 src/applications/differential/controller/DifferentialRevisionViewController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/controller/DifferentialRevisionViewController.php
Show First 20 Lines • Show All 1,276 Lines • ▼ Show 20 Lines | private function buildOperationsBox(DifferentialRevision $revision) { | ||||
return id(new DrydockRepositoryOperationStatusView()) | return id(new DrydockRepositoryOperationStatusView()) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setBoxView($box_view) | ->setBoxView($box_view) | ||||
->setOperation($operation); | ->setOperation($operation); | ||||
} | } | ||||
private function buildUnitMessagesView( | private function buildUnitMessagesView( | ||||
$diff, | DifferentialDiff $diff, | ||||
DifferentialRevision $revision) { | DifferentialRevision $revision) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
if (!$diff->getBuildable()) { | if (!$diff->getBuildable()) { | ||||
return null; | return null; | ||||
} | } | ||||
if (!$diff->getUnitMessages()) { | if (!$diff->getUnitMessages()) { | ||||
Show All 11 Lines | foreach ($diff->getUnitMessages() as $message) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (!$interesting_messages) { | if (!$interesting_messages) { | ||||
return null; | return null; | ||||
} | } | ||||
$excuse = null; | |||||
if ($diff->hasDiffProperty('arc:unit-excuse')) { | |||||
$excuse = $diff->getProperty('arc:unit-excuse'); | |||||
} | |||||
return id(new HarbormasterUnitSummaryView()) | return id(new HarbormasterUnitSummaryView()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setExcuse($excuse) | |||||
->setBuildable($diff->getBuildable()) | ->setBuildable($diff->getBuildable()) | ||||
->setUnitMessages($diff->getUnitMessages()) | ->setUnitMessages($diff->getUnitMessages()) | ||||
->setLimit(5) | ->setLimit(5) | ||||
->setShowViewAll(true); | ->setShowViewAll(true); | ||||
} | } | ||||
private function getOldDiffID(DifferentialRevision $revision, array $diffs) { | private function getOldDiffID(DifferentialRevision $revision, array $diffs) { | ||||
assert_instances_of($diffs, 'DifferentialDiff'); | assert_instances_of($diffs, 'DifferentialDiff'); | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |