From 5b1dd96e40e83a4b37b4f87ed53e56c17ccb1568 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 10 Jun 2020 10:11:01 -0700 Subject: [PATCH] Add an explicit "uri" to the "harbormaster.buildable.search" results Summary: Ref T13546. This makes some "arc" tasks a little easier, and will make them more correct if "arc" ever switches to using SSH. Test Plan: Ran "harbormaster.buildable.search" from the web UI, saw URIs in the result set. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13546 Differential Revision: https://secure.phabricator.com/D21346 --- .../harbormaster/storage/HarbormasterBuildable.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/harbormaster/storage/HarbormasterBuildable.php b/src/applications/harbormaster/storage/HarbormasterBuildable.php index aabfd49eb9..df8451d842 100644 --- a/src/applications/harbormaster/storage/HarbormasterBuildable.php +++ b/src/applications/harbormaster/storage/HarbormasterBuildable.php @@ -366,6 +366,10 @@ final class HarbormasterBuildable ->setKey('isManual') ->setType('bool') ->setDescription(pht('True if this is a manual buildable.')), + id(new PhabricatorConduitSearchFieldSpecification()) + ->setKey('uri') + ->setType('uri') + ->setDescription(pht('View URI for the buildable.')), ); } @@ -377,6 +381,7 @@ final class HarbormasterBuildable 'value' => $this->getBuildableStatus(), ), 'isManual' => (bool)$this->getIsManualBuildable(), + 'uri' => PhabricatorEnv::getURI($this->getURI()), ); }