mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 23:40:57 +01:00
Expose Build Plan behaviors via "harbormaster.buildplan.search"
Summary: Ref T13258. This will support changing behaviors in "arc land". Test Plan: Called "harbormaster.buildplan.search", saw behavior information in results. Reviewers: amckinley Reviewed By: amckinley Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13258 Differential Revision: https://secure.phabricator.com/D20228
This commit is contained in:
parent
d36d0efc35
commit
983cf885e7
1 changed files with 16 additions and 0 deletions
|
@ -233,15 +233,31 @@ final class HarbormasterBuildPlan extends HarbormasterDAO
|
|||
->setKey('status')
|
||||
->setType('map<string, wild>')
|
||||
->setDescription(pht('The current status of this build plan.')),
|
||||
id(new PhabricatorConduitSearchFieldSpecification())
|
||||
->setKey('behaviors')
|
||||
->setType('map<string, string>')
|
||||
->setDescription(pht('Behavior configuration for the build plan.')),
|
||||
);
|
||||
}
|
||||
|
||||
public function getFieldValuesForConduit() {
|
||||
$behavior_map = array();
|
||||
|
||||
$behaviors = HarbormasterBuildPlanBehavior::newPlanBehaviors();
|
||||
foreach ($behaviors as $behavior) {
|
||||
$option = $behavior->getPlanOption($this);
|
||||
|
||||
$behavior_map[$behavior->getKey()] = array(
|
||||
'value' => $option->getKey(),
|
||||
);
|
||||
}
|
||||
|
||||
return array(
|
||||
'name' => $this->getName(),
|
||||
'status' => array(
|
||||
'value' => $this->getPlanStatus(),
|
||||
),
|
||||
'behaviors' => $behavior_map,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue