Skip to content

Commit 4bbcd43

Browse files
fix: update Github class for guzzle 8 compatibility (#9403)
1 parent 06825ce commit 4bbcd43

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

dev/src/GitHub.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function doesTagExist($target, $tagName)
9898
self::GITHUB_RELEASE_ENDPOINT,
9999
$this->cleanTarget($target), $tagName
100100
), [
101-
'auth' => [null, $this->token]
101+
'auth' => ['', $this->token]
102102
]);
103103

104104
return ($res->getStatusCode() === 200);
@@ -135,7 +135,7 @@ public function createRelease($target, $tagName, $display, $notes)
135135
$this->cleanTarget($target)
136136
), [
137137
'json' => $requestBody,
138-
'auth' => [null, $this->token]
138+
'auth' => ['', $this->token]
139139
]);
140140

141141
return $res->getStatusCode() === 201;
@@ -165,7 +165,7 @@ public function updateReleaseNotes($target, $tagName, $notes)
165165
$this->cleanTarget($target),
166166
$tagName
167167
), [
168-
'auth' => [null, $this->token]
168+
'auth' => ['', $this->token]
169169
]);
170170

171171
if ($release = json_decode((string) $res->getBody(), true)) {
@@ -181,7 +181,7 @@ public function updateReleaseNotes($target, $tagName, $notes)
181181
$tagId
182182
), [
183183
'json' => $requestBody,
184-
'auth' => [null, $this->token]
184+
'auth' => ['', $this->token]
185185
]);
186186

187187
return $res->getStatusCode() === 201;
@@ -207,7 +207,7 @@ public function getChangelog($target, $tagName): string|null|false
207207
$target,
208208
$tagName
209209
), [
210-
'auth' => [null, $this->token]
210+
'auth' => ['', $this->token]
211211
]);
212212

213213
return json_decode((string) $res->getBody(), true)['body'];
@@ -269,7 +269,7 @@ public function getRepoDetails($target)
269269
self::GITHUB_REPO_ENDPOINT,
270270
$this->cleanTarget($target)
271271
), [
272-
'auth' => [null, $this->token]
272+
'auth' => ['', $this->token]
273273
]);
274274

275275
$this->targetInfoCache[$target] = $res;
@@ -292,7 +292,7 @@ public function getTeams(string $repoName)
292292
self::GITHUB_TEAMS_ENDPOINT,
293293
$this->cleanTarget($repoName)
294294
), [
295-
'auth' => [null, $this->token]
295+
'auth' => ['', $this->token]
296296
]);
297297

298298
return json_decode((string) $res->getBody(), true);
@@ -317,7 +317,7 @@ public function getReleases($target, ?DateTime $fromDate = null): ?array
317317
self::GITHUB_RELEASE_CREATE_ENDPOINT,
318318
$this->cleanTarget($target)
319319
), [
320-
'auth' => [null, $this->token]
320+
'auth' => ['', $this->token]
321321
]);
322322
} catch (\Exception $e) {
323323
$this->logException($e);
@@ -347,7 +347,7 @@ public function updateRepoDetails(string $repoName, array $settings): bool
347347
self::GITHUB_REPO_ENDPOINT,
348348
$repoName
349349
), [
350-
'auth' => [null, $this->token],
350+
'auth' => ['', $this->token],
351351
'body' => json_encode($settings),
352352
]);
353353

@@ -371,7 +371,7 @@ public function updateTeamPermission(
371371
$teamName,
372372
$repoName,
373373
), [
374-
'auth' => [null, $this->token],
374+
'auth' => ['', $this->token],
375375
'body' => json_encode(['permission' => $permission]),
376376
]);
377377
return $res->getStatusCode() == 204;
@@ -394,7 +394,7 @@ public function addWebhook(
394394
self::GITHUB_WEBHOOK_CREATE_ENDPOINT,
395395
$this->cleanTarget($target)
396396
), [
397-
'auth' => [null, $this->token],
397+
'auth' => ['', $this->token],
398398
'json' => [
399399
'name' => 'web',
400400
'active' => true,
@@ -436,7 +436,7 @@ public function getWebhook(
436436
self::GITHUB_WEBHOOKS_LIST_ENDPOINT,
437437
$this->cleanTarget($target)
438438
), [
439-
'auth' => [null, $this->token],
439+
'auth' => ['', $this->token],
440440
]);
441441
} catch (\Exception $e) {
442442
$this->logException($e);
@@ -477,7 +477,7 @@ public function updateWebhook(
477477
$this->cleanTarget($target),
478478
$webhookId
479479
), [
480-
'auth' => [null, $this->token],
480+
'auth' => ['', $this->token],
481481
'json' => [
482482
'config' => [
483483
'content_type' => 'json',

0 commit comments

Comments
 (0)