Differential D13850 Diff 33455 src/applications/differential/customfield/DifferentialHarbormasterField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/customfield/DifferentialHarbormasterField.php
Show All 23 Lines | $properties = id(new DifferentialDiffProperty())->loadAllWhere( | ||||
$diff->getID(), | $diff->getID(), | ||||
$keys); | $keys); | ||||
$properties = mpull($properties, 'getData', 'getName'); | $properties = mpull($properties, 'getData', 'getName'); | ||||
foreach ($keys as $key) { | foreach ($keys as $key) { | ||||
$diff->attachProperty($key, idx($properties, $key)); | $diff->attachProperty($key, idx($properties, $key)); | ||||
} | } | ||||
$messages = array(); | $target_phids = $diff->getBuildTargetPHIDs(); | ||||
$buildable = $diff->getBuildable(); | |||||
if ($buildable) { | |||||
$target_phids = array(); | |||||
foreach ($buildable->getBuilds() as $build) { | |||||
foreach ($build->getBuildTargets() as $target) { | |||||
$target_phids[] = $target->getPHID(); | |||||
} | |||||
} | |||||
if ($target_phids) { | if ($target_phids) { | ||||
$messages = $this->loadHarbormasterTargetMessages($target_phids); | $messages = $this->loadHarbormasterTargetMessages($target_phids); | ||||
} | } else { | ||||
$messages = array(); | |||||
} | } | ||||
if (!$messages) { | if (!$messages) { | ||||
// No Harbormaster messages, so look for legacy messages and make them | // No Harbormaster messages, so look for legacy messages and make them | ||||
// look like modern messages. | // look like modern messages. | ||||
$legacy_messages = $diff->getProperty($this->getLegacyProperty()); | $legacy_messages = $diff->getProperty($this->getLegacyProperty()); | ||||
if ($legacy_messages) { | if ($legacy_messages) { | ||||
// Show the top 100 legacy lint messages. Previously, we showed some | // Show the top 100 legacy lint messages. Previously, we showed some | ||||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |