Load buildables in DiffViewController
Summary: Fixes T9128. I missed this when converting other controllers to look in Harbormaster for lint/unit data. Test Plan: Copy/pasted a diff successfully. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9128 Differential Revision: https://secure.phabricator.com/D13865
This commit is contained in:
@@ -29,6 +29,17 @@ final class DifferentialDiffViewController extends DifferentialController {
|
||||
->setURI('/D'.$diff->getRevisionID().'?id='.$diff->getID());
|
||||
}
|
||||
|
||||
$diff_phid = $diff->getPHID();
|
||||
$buildables = id(new HarbormasterBuildableQuery())
|
||||
->setViewer($viewer)
|
||||
->withBuildablePHIDs(array($diff_phid))
|
||||
->withManualBuildables(false)
|
||||
->needBuilds(true)
|
||||
->needTargets(true)
|
||||
->execute();
|
||||
$buildables = mpull($buildables, null, 'getBuildablePHID');
|
||||
$diff->attachBuildable(idx($buildables, $diff_phid));
|
||||
|
||||
// TODO: implement optgroup support in AphrontFormSelectControl?
|
||||
$select = array();
|
||||
$select[] = hsprintf('<optgroup label="%s">', pht('Create New Revision'));
|
||||
|
||||
Reference in New Issue
Block a user