Skip to content

Commit 6dc50b3

Browse files
committed
Merged in sstok/bitbucket-api/fix-PullRequests (pull request gentlero#6)
Fixed Content-Type for `PullRequests::accept` and `PullRequests::decline`.
2 parents b74488a + 17707bb commit 6dc50b3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Bitbucket/API/Repositories/PullRequests.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ public function accept($account, $repo, $id, $params = array())
290290
{
291291
return $this->getClient()->setApiVersion('2.0')->post(
292292
sprintf('repositories/%s/%s/pullrequests/%d/merge', $account, $repo, $id),
293-
$params
293+
json_encode($params),
294+
array('Content-Type' => 'application/json')
294295
);
295296
}
296297

@@ -308,7 +309,8 @@ public function decline($account, $repo, $id, $params = array())
308309
{
309310
return $this->getClient()->setApiVersion('2.0')->post(
310311
sprintf('repositories/%s/%s/pullrequests/%d/decline', $account, $repo, $id),
311-
$params
312+
json_encode($params),
313+
array('Content-Type' => 'application/json')
312314
);
313315
}
314316
}

0 commit comments

Comments
 (0)