1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-20 04:20:55 +01:00

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:
epriestley 2015-08-11 06:39:05 -07:00
parent 2cf9ded878
commit 53ffaaa889

View file

@ -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'));