From d0d33094d60eda8aebb2ba9206be4b16a6428050 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Tue, 29 Nov 2011 14:55:50 -0800 Subject: [PATCH] add projectName to conduit.getdiff Summary: some ground work for T479 Test Plan: called up a diff via the conduit api console it had the right project name and did not error Reviewers: epriestley Reviewed By: epriestley CC: aran, btrahan, epriestley Differential Revision: 1139 --- .../ConduitAPI_differential_getdiff_Method.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php b/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php index df9a28d00b..5745d182ce 100644 --- a/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php +++ b/src/applications/conduit/method/differential/getdiff/ConduitAPI_differential_getdiff_Method.php @@ -76,7 +76,19 @@ class ConduitAPI_differential_getdiff_Method extends ConduitAPIMethod { $changeset->attachHunks($changeset->loadHunks()); } - return $diff->getDiffDict(); + $basic_dict = $diff->getDiffDict(); + + // for conduit calls, the basic dict is not enough + // we also need to include the arcanist project + $project = $diff->loadArcanistProject(); + if ($project) { + $project_name = $project->getName(); + } else { + $project_name = ''; + } + $basic_dict['projectName'] = $project_name; + + return $basic_dict; } }