Skip to content

Commit 19d6e2a

Browse files
committed
Commits:all() should use GET instead of POST
1 parent 5aba731 commit 19d6e2a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Bitbucket/API/Repositories/Commits.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class Commits extends Api
2121
{
2222
/**
23-
* Get a list of pull requests
23+
* Get a list of commits
2424
*
2525
* @access public
2626
* @param string $account The team or individual account owning the repository.
@@ -37,7 +37,7 @@ public function all($account, $repo, $params = array())
3737
unset($params['branch']);
3838
}
3939

40-
return $this->getClient()->setApiVersion('2.0')->post(
40+
return $this->getClient()->setApiVersion('2.0')->get(
4141
$endpoint,
4242
$params
4343
);

test/Bitbucket/Tests/API/Repositories/CommitsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function testGetAllRepositoryCommits()
1414

1515
$client = $this->getHttpClientMock();
1616
$client->expects($this->once())
17-
->method('post')
17+
->method('get')
1818
->with($endpoint)
1919
->will($this->returnValue($expectedResult));
2020

@@ -32,7 +32,7 @@ public function testGetAllRepositoryCommitsFromSpecificBranch()
3232

3333
$client = $this->getHttpClientMock();
3434
$client->expects($this->once())
35-
->method('post')
35+
->method('get')
3636
->with($endpoint)
3737
->will($this->returnValue($expectedResult));
3838

0 commit comments

Comments
 (0)