Skip to content

Commit f92659e

Browse files
Merge branch '10.1' into 10.2
2 parents 59793d5 + a288472 commit f92659e

File tree

3 files changed

+37
-19
lines changed

3 files changed

+37
-19
lines changed

CHANGELOG.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,53 @@
1-
CHANGE LOG
2-
==========
1+
# Changelog
32

3+
All notable changes to this project will be documented in this file.
44

5-
## 10.2.0 (UPCOMING)
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

8+
## [10.2.0] - UPCOMING
79

8-
## 10.1.1 (26/10/2020)
10+
[10.2.0]: https://github.com/GitLabPHP/Client/compare/10.1.1...10.2.0
11+
12+
## [10.1.1] - 2020-10-26
913

1014
* Fixed phpdoc typo
1115
* Fixed broken query builder
1216

17+
[10.1.1]: https://github.com/GitLabPHP/Client/compare/10.1.0...10.1.1
1318

14-
## 10.1.0 (24/10/2020)
19+
## [10.1.0] - 2020-10-24
1520

1621
* Added method to get protected branches for a project
1722
* Added with_merge_status_recheck option for fetching MRs
1823
* Added commit cherry-pick API
1924
* Added support for optional Note parameters
2025
* Deprecated models API
2126

27+
[10.1.0]: https://github.com/GitLabPHP/Client/compare/10.0.1...10.1.0
2228

23-
## 10.0.1 (24/10/2020)
29+
## [10.0.1] - 2020-10-24
2430

2531
* Fixed using the name of a group as an ID
2632
* Fixed various phpdoc issues
2733
* Reverted query builder changes
2834

35+
[10.0.1]: https://github.com/GitLabPHP/Client/compare/10.0.0...10.0.1
2936

30-
## 10.0.0 (15/08/2020)
37+
## [10.0.0] - 2020-08-15
3138

3239
* Added void return types to void methods
3340

41+
[10.0.0]: https://github.com/GitLabPHP/Client/compare/10.0.0-RC2...10.0.0
3442

35-
## 10.0.0-RC2 (23/07/2020)
43+
## [10.0.0-RC2] - 2020-07-23
3644

3745
* Restored 9.x behaviour for empty JSON responses
3846
* Support the issue link link_type parameter
3947

48+
[10.0.0-RC2]: https://github.com/GitLabPHP/Client/compare/10.0.0-RC1...10.0.0-RC2
4049

41-
## 10.0.0-RC1 (22/07/2020)
50+
## [10.0.0-RC1] - 2020-07-22
4251

4352
* Removed all deprecated functionality
4453
* Switched to PSR-17 and PSR-18
@@ -49,14 +58,16 @@ CHANGE LOG
4958
* Added scalar param types
5059
* Added user events API
5160

61+
[10.0.0-RC1]: https://github.com/GitLabPHP/Client/compare/9.18.1...10.0.0-RC1
5262

53-
## 9.18.1 (22/07/2020)
63+
## [9.18.1] - 2020-07-22
5464

5565
* Fixed error in getHeader function
5666
* Fixed incorrect param type doc
5767

68+
[9.18.1]: https://github.com/GitLabPHP/Client/compare/9.18.0...9.18.1
5869

59-
## 9.18.0 (11/07/2020)
70+
## [9.18.0] - 2020-07-11
6071

6172
* Deprecated all APIs that are deprecated or removed as of GitLab 13.1
6273
* Deprecated old authentication methods and deprecated not specifying an authentication mode
@@ -76,18 +87,22 @@ CHANGE LOG
7687
* Allow to search and find issues by "assignee_id"
7788
* Updated Issues to support updated_after
7889

90+
[9.18.0]: https://github.com/GitLabPHP/Client/compare/9.17.1...9.18.0
7991

80-
## 9.17.1 (17/02/2020)
92+
## [9.17.1] - 2020-02-17
8193

8294
* Fixed text encoding for `Repositories::createCommit()`
8395
* Corrected lots of phpdoc errors and edges cases
8496

97+
[9.17.1]: https://github.com/GitLabPHP/Client/compare/9.17.0...9.17.1
8598

86-
## 9.17.0 (17/02/2020)
99+
## [9.17.0] - 2020-02-17
87100

88101
* Added support for the wiki APIs
89102
* Implemented `Environments::show()`
90103
* Implemented `Issues::showParticipants()`
91104
* Add method to get issues for a group
92105
* Add forks API call to return all forked projects
93106
* Added users projects request parameters normalization
107+
108+
[9.17.0]: https://github.com/GitLabPHP/Client/compare/9.16.0...9.17.0

src/Api/Repositories.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,13 @@ public function postCommitBuildStatus($project_id, string $sha, string $state, a
386386
*/
387387
public function compare($project_id, string $fromShaOrMaster, string $toShaOrMaster, bool $straight = false)
388388
{
389-
return $this->get($this->getProjectPath(
390-
$project_id,
391-
'repository/compare?from='.self::encodePath($fromShaOrMaster).'&to='.self::encodePath($toShaOrMaster).'&straight='.self::encodePath($straight ? 'true' : 'false')
392-
));
389+
$params = [
390+
'from' => self::encodePath($fromShaOrMaster),
391+
'to' => self::encodePath($toShaOrMaster),
392+
'straight' => self::encodePath($straight ? 'true' : 'false'),
393+
];
394+
395+
return $this->get($this->getProjectPath($project_id, 'repository/compare'), $params);
393396
}
394397

395398
/**

tests/Api/RepositoriesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ public function shouldCompareStraight(): void
490490
$api = $this->getApiMock();
491491
$api->expects($this->once())
492492
->method('get')
493-
->with('projects/1/repository/compare?from=master&to=feature&straight=true')
493+
->with('projects/1/repository/compare', ['from' => 'master', 'to' => 'feature', 'straight' => 'true'])
494494
->will($this->returnValue($expectedArray))
495495
;
496496

@@ -507,7 +507,7 @@ public function shouldNotCompareStraight(): void
507507
$api = $this->getApiMock();
508508
$api->expects($this->once())
509509
->method('get')
510-
->with('projects/1/repository/compare?from=master&to=feature&straight=false')
510+
->with('projects/1/repository/compare', ['from' => 'master', 'to' => 'feature', 'straight' => 'false'])
511511
->will($this->returnValue($expectedArray))
512512
;
513513

0 commit comments

Comments
 (0)