Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/customfield/DifferentialLintField.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | public function renderDiffPropertyViewValue(DifferentialDiff $diff) { | ||||
foreach ($keys as $key) { | foreach ($keys as $key) { | ||||
$diff->attachProperty($key, idx($properties, $key)); | $diff->attachProperty($key, idx($properties, $key)); | ||||
} | } | ||||
$status = $this->renderLintStatus($diff); | $status = $this->renderLintStatus($diff); | ||||
$lint = array(); | $lint = array(); | ||||
// TODO: Look for Harbormaster messages here. | $buildable = $diff->getBuildable(); | ||||
if ($buildable) { | |||||
$target_phids = array(); | |||||
foreach ($buildable->getBuilds() as $build) { | |||||
foreach ($build->getBuildTargets() as $target) { | |||||
$target_phids[] = $target->getPHID(); | |||||
} | |||||
} | |||||
$lint = id(new HarbormasterBuildLintMessage())->loadAllWhere( | |||||
'buildTargetPHID IN (%Ls) LIMIT 25', | |||||
$target_phids); | |||||
} | |||||
if (!$lint) { | if (!$lint) { | ||||
// 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_lint = $diff->getProperty('arc:lint'); | $legacy_lint = $diff->getProperty('arc:lint'); | ||||
if ($legacy_lint) { | if ($legacy_lint) { | ||||
// Show the top 100 legacy lint messages. Previously, we showed some | // Show the top 100 legacy lint messages. Previously, we showed some | ||||
// by default and let the user toggle the rest. With modern messages, | // by default and let the user toggle the rest. With modern messages, | ||||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |