mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-03-28 04:00:16 +01:00
Summary: Ref T13258. This makes "arc land" respect the new "Warn When Landing" behavior. This will only work if you have very up-to-date APIs. Just fall back to the older code if the new API calls fail. Test Plan: Ran `arc land` on a revision with builds in various states and with the different "Warn When Landing" behaviors. Saw appropriate warnings. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13258 Differential Revision: https://secure.phabricator.com/D20236
25 lines
479 B
PHP
25 lines
479 B
PHP
<?php
|
|
|
|
final class ArcanistBuildPlanRef
|
|
extends Phobject {
|
|
|
|
private $parameters;
|
|
|
|
public static function newFromConduit(array $data) {
|
|
$ref = new self();
|
|
$ref->parameters = $data;
|
|
return $ref;
|
|
}
|
|
|
|
public function getPHID() {
|
|
return $this->parameters['phid'];
|
|
}
|
|
|
|
public function getBehavior($behavior_key, $default = null) {
|
|
return idxv(
|
|
$this->parameters,
|
|
array('fields', 'behaviors', $behavior_key, 'value'),
|
|
$default);
|
|
}
|
|
|
|
}
|