From 0ed8d196bbfb5d208d9357b0ea3091ebbc754eaa Mon Sep 17 00:00:00 2001 From: Piotr Plenik Date: Mon, 28 May 2012 14:36:10 +0200 Subject: [PATCH 1/2] fix getting one pull request in particular --- lib/Github/Api/PullRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Github/Api/PullRequest.php b/lib/Github/Api/PullRequest.php index 7d7daf4e624..0fcef9a7b13 100644 --- a/lib/Github/Api/PullRequest.php +++ b/lib/Github/Api/PullRequest.php @@ -37,7 +37,7 @@ public function listPullRequests($username, $repo, $state = '') public function show($username, $repo, $pullRequestId) { $response = $this->get('pulls/'.urlencode($username).'/'.urlencode($repo).'/'.urlencode($pullRequestId)); - return $response['pulls']; + return $response; } /** From 51915a3398acff54a5a60e759582a9b7ae469442 Mon Sep 17 00:00:00 2001 From: Piotr Plenik Date: Mon, 28 May 2012 14:41:23 +0200 Subject: [PATCH 2/2] set correct array key --- lib/Github/Api/PullRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Github/Api/PullRequest.php b/lib/Github/Api/PullRequest.php index 0fcef9a7b13..8c8d8bcd2f5 100644 --- a/lib/Github/Api/PullRequest.php +++ b/lib/Github/Api/PullRequest.php @@ -37,7 +37,7 @@ public function listPullRequests($username, $repo, $state = '') public function show($username, $repo, $pullRequestId) { $response = $this->get('pulls/'.urlencode($username).'/'.urlencode($repo).'/'.urlencode($pullRequestId)); - return $response; + return $response['pull']; } /**