From dfd53fb008c346415f8ce603408c4f6f718785a2 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 8 Feb 2014 16:32:20 -0800 Subject: [PATCH] Return "uri" field in `diffusion.querycommits` Summary: See IRC transcript. Test Plan: {F110975} Reviewers: btrahan, spicyj Reviewed By: spicyj CC: aran Differential Revision: https://secure.phabricator.com/D8172 --- .../conduit/ConduitAPI_diffusion_querycommits_Method.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/applications/diffusion/conduit/ConduitAPI_diffusion_querycommits_Method.php b/src/applications/diffusion/conduit/ConduitAPI_diffusion_querycommits_Method.php index d4df1673ef..9c5c3301d7 100644 --- a/src/applications/diffusion/conduit/ConduitAPI_diffusion_querycommits_Method.php +++ b/src/applications/diffusion/conduit/ConduitAPI_diffusion_querycommits_Method.php @@ -62,12 +62,18 @@ final class ConduitAPI_diffusion_querycommits_Method $data = array(); foreach ($commits as $commit) { + $callsign = $commit->getRepository()->getCallsign(); + $identifier = $commit->getCommitIdentifier(); + $uri = '/r'.$callsign.$identifier; + $uri = PhabricatorEnv::getProductionURI($uri); + $data[$commit->getPHID()] = array( 'id' => $commit->getID(), 'phid' => $commit->getPHID(), 'repositoryPHID' => $commit->getRepository()->getPHID(), - 'identifier' => $commit->getCommitIdentifier(), + 'identifier' => $identifier, 'epoch' => $commit->getEpoch(), + 'uri' => $uri, 'isImporting' => !$commit->isImported(), ); }