Skip to content

Commit a7ae16f

Browse files
authored
Merge branch 'KnpLabs:master' into master
2 parents eec590e + 9afaf87 commit a7ae16f

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

CHANGELOG-3.X.md

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

3+
## 3.13.0
4+
5+
### Added
6+
- Test against php 8.3 ([sergiy-petrov](https://github.com/sergiy-petrov)) [#1124](https://github.com/KnpLabs/php-github-api/issues/1124)
7+
- feat: Secret Scanning Alerts ([haridarshan](https://github.com/haridarshan)) [#1114](https://github.com/KnpLabs/php-github-api/issues/1114)
8+
- feat: User Migration ([haridarshan](https://github.com/haridarshan)) [#1115](https://github.com/KnpLabs/php-github-api/issues/1115)
9+
10+
### Changed
11+
- General chores ([acrobat](https://github.com/acrobat)) [#1125](https://github.com/KnpLabs/php-github-api/issues/1125)
12+
13+
### Fixed
14+
- Fix detection of secondary rate limit ([mathieudz](https://github.com/mathieudz)) [#1126](https://github.com/KnpLabs/php-github-api/issues/1126)
15+
316
## 3.12.0
417

518
### Added

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"extra": {
5353
"branch-alias": {
5454
"dev-2.x": "2.20.x-dev",
55-
"dev-master": "3.12-dev"
55+
"dev-master": "3.13-dev"
5656
}
5757
},
5858
"config": {

lib/Github/HttpClient/Plugin/GithubExceptionThrower.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
128128
}
129129

130130
$reset = (int) ResponseMediator::getHeader($response, 'X-RateLimit-Reset');
131-
if ((403 === $response->getStatusCode()) && 0 < $reset && isset($content['message']) && (0 === strpos($content['message'], 'You have exceeded a secondary rate limit.'))) {
131+
if ((403 === $response->getStatusCode()) && 0 < $reset && isset($content['message']) && (0 === strpos($content['message'], 'You have exceeded a secondary rate limit'))) {
132132
$limit = (int) ResponseMediator::getHeader($response, 'X-RateLimit-Limit');
133133

134134
throw new ApiLimitExceedException($limit, $reset);

test/Github/Tests/HttpClient/Plugin/GithubExceptionThrowerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static function responseProvider()
103103
],
104104
json_encode(
105105
[
106-
'message' => 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again.',
106+
'message' => 'You have exceeded a secondary rate limit and have been temporarily blocked from content creation. Please retry your request again later. If you reach out to GitHub Support for help, please include the request ID #xxxxxxx.',
107107
]
108108
)
109109
),

0 commit comments

Comments
 (0)