Skip to content

Commit 74a46ee

Browse files
authored
Merge branch 'KnpLabs:master' into master
2 parents a1f9686 + 1f31aa1 commit 74a46ee

File tree

8 files changed

+30
-22
lines changed

8 files changed

+30
-22
lines changed

CHANGELOG-3.X.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 3.6.0
4+
5+
### Added
6+
- Include optional params parameter for Commits compare method ([mountiny](https://github.com/mountiny)) [#1053](https://github.com/KnpLabs/php-github-api/issues/1053)
7+
8+
### Changed
9+
- Update incorrect documentation ([pheeque1](https://github.com/pheeque1)) [#1058](https://github.com/KnpLabs/php-github-api/issues/1058)
10+
11+
### Fixed
12+
- fix(Apps): use /orgs/ORG/installation ([ellisio](https://github.com/ellisio)) [#1056](https://github.com/KnpLabs/php-github-api/issues/1056)
13+
14+
## 3.5.1
15+
16+
### Fixed
17+
- Boolean private needed to create private repo! ([mruell](https://github.com/mruell)) [#1051](https://github.com/KnpLabs/php-github-api/issues/1051)
18+
319
## 3.5.0
420

521
### Added

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
},
5858
"config": {
5959
"allow-plugins": {
60-
"phpstan/extension-installer": true
60+
"phpstan/extension-installer": true,
61+
"composer/package-versions-deprecated": true
6162
}
6263
}
6364
}

doc/users.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ Wrap [GitHub User API](http://developer.github.com/v3/users/).
66

77
### Search for users by keyword
88

9-
```php
10-
$users = $client->api('user')->find('KnpLabs');
11-
```
12-
13-
Returns an array of found users.
9+
Use the [Search API](https://github.com/KnpLabs/php-github-api/blob/master/doc/search.md#search-users) to find users by keyword.
1410

1511
### Lists all users, in the order they signed up, since the last user you've seen
1612

lib/Github/Api/Apps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function getInstallationForOrganization($org)
8282
{
8383
$this->configurePreviewHeader();
8484

85-
return $this->get('/org/'.rawurldecode($org).'/installation');
85+
return $this->get('/orgs/'.rawurldecode($org).'/installation');
8686
}
8787

8888
/**

lib/Github/Api/PullRequest/ReviewRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ public function all($username, $repository, $pullRequest, array $params = [])
3939
}
4040

4141
/**
42-
* @link https://developer.github.com/v3/pulls/review_requests/#create-a-review-request
42+
* @link https://docs.github.com/en/rest/reference/pulls#request-reviewers-for-a-pull-request
4343
*
4444
* @param string $username
4545
* @param string $repository
4646
* @param int $pullRequest
4747
* @param array $reviewers
4848
* @param array $teamReviewers
4949
*
50-
* @return string
50+
* @return array
5151
*/
5252
public function create($username, $repository, $pullRequest, array $reviewers = [], array $teamReviewers = [])
5353
{

lib/Github/Api/Repository/Commits.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ public function all($username, $repository, array $params)
1616
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/commits', $params);
1717
}
1818

19-
public function compare($username, $repository, $base, $head, $mediaType = null)
19+
public function compare($username, $repository, $base, $head, $mediaType = null, array $params = [])
2020
{
2121
$headers = [];
2222
if (null !== $mediaType) {
2323
$headers['Accept'] = $mediaType;
2424
}
2525

26-
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/compare/'.rawurlencode($base).'...'.rawurlencode($head), [], $headers);
26+
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/compare/'.rawurlencode($base).'...'.rawurlencode($head), $params, $headers);
2727
}
2828

2929
public function show($username, $repository, $sha)

test/Github/Tests/Api/AppTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function shouldGetInstallationForOrganization()
6666
$api = $this->getApiMock();
6767
$api->expects($this->once())
6868
->method('get')
69-
->with('/org/1234/installation')
69+
->with('/orgs/1234/installation')
7070
->willReturn($result);
7171

7272
$this->assertEquals($result, $api->getInstallationForOrganization('1234'));

test/Github/Tests/HttpClient/Message/ResponseMediatorTest.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,13 @@ public function testGetContentInvalidJson()
5454

5555
public function testGetPagination()
5656
{
57-
$header = <<<'TEXT'
58-
<http://github.com>; rel="first",
59-
<http://github.com>; rel="next",
60-
<http://github.com>; rel="prev",
61-
<http://github.com>; rel="last",
62-
TEXT;
57+
$header = '<https://github.com>; rel="first",<https://github.com>; rel="next",<https://github.com>; rel="prev",<https://github.com>; rel="last",';
6358

6459
$pagination = [
65-
'first' => 'http://github.com',
66-
'next' => 'http://github.com',
67-
'prev' => 'http://github.com',
68-
'last' => 'http://github.com',
60+
'first' => 'https://github.com',
61+
'next' => 'https://github.com',
62+
'prev' => 'https://github.com',
63+
'last' => 'https://github.com',
6964
];
7065

7166
// response mock

0 commit comments

Comments
 (0)