diff --git a/src/Github/Api/V3/CreatePullRequestThroughApiCall.php b/src/Github/Api/V3/CreatePullRequestThroughApiCall.php index a3249370..ced40152 100644 --- a/src/Github/Api/V3/CreatePullRequestThroughApiCall.php +++ b/src/Github/Api/V3/CreatePullRequestThroughApiCall.php @@ -48,7 +48,7 @@ public function __invoke( ) ->withAddedHeader('Content-Type', 'application/json') ->withAddedHeader('User-Agent', 'Ocramius\'s minimal API V3 client') - ->withAddedHeader('Authorization', 'bearer ' . $this->apiToken); + ->withAddedHeader('Authorization', 'token ' . $this->apiToken); $request ->getBody() diff --git a/src/Github/Api/V3/CreateReleaseThroughApiCall.php b/src/Github/Api/V3/CreateReleaseThroughApiCall.php index a43abb8a..071da577 100644 --- a/src/Github/Api/V3/CreateReleaseThroughApiCall.php +++ b/src/Github/Api/V3/CreateReleaseThroughApiCall.php @@ -49,7 +49,7 @@ public function __invoke( ) ->withAddedHeader('Content-Type', 'application/json') ->withAddedHeader('User-Agent', 'Ocramius\'s minimal API V3 client') - ->withAddedHeader('Authorization', 'bearer ' . $this->apiToken); + ->withAddedHeader('Authorization', 'token ' . $this->apiToken); $request ->getBody() diff --git a/src/Github/Api/V3/SetDefaultBranchThroughApiCall.php b/src/Github/Api/V3/SetDefaultBranchThroughApiCall.php index 63937a6e..97255dff 100644 --- a/src/Github/Api/V3/SetDefaultBranchThroughApiCall.php +++ b/src/Github/Api/V3/SetDefaultBranchThroughApiCall.php @@ -45,7 +45,7 @@ public function __invoke( ) ->withAddedHeader('Content-Type', 'application/json') ->withAddedHeader('User-Agent', 'Ocramius\'s minimal API V3 client') - ->withAddedHeader('Authorization', 'bearer ' . $this->apiToken); + ->withAddedHeader('Authorization', 'token ' . $this->apiToken); $request ->getBody() diff --git a/test/unit/Github/Api/V3/CreatePullRequestTest.php b/test/unit/Github/Api/V3/CreatePullRequestTest.php index a52451f3..138b6ad6 100644 --- a/test/unit/Github/Api/V3/CreatePullRequestTest.php +++ b/test/unit/Github/Api/V3/CreatePullRequestTest.php @@ -76,7 +76,7 @@ public function testSuccessfulRequest(): void 'Host' => ['the-domain.com'], 'Content-Type' => ['application/json'], 'User-Agent' => ['Ocramius\'s minimal API V3 client'], - 'Authorization' => ['bearer ' . $this->apiToken], + 'Authorization' => ['token ' . $this->apiToken], ], $request->getHeaders() ); diff --git a/test/unit/Github/Api/V3/CreateReleaseTest.php b/test/unit/Github/Api/V3/CreateReleaseTest.php index 0c636b92..f3f60d9d 100644 --- a/test/unit/Github/Api/V3/CreateReleaseTest.php +++ b/test/unit/Github/Api/V3/CreateReleaseTest.php @@ -74,7 +74,7 @@ public function testSuccessfulRequest(): void 'Host' => ['the-domain.com'], 'Content-Type' => ['application/json'], 'User-Agent' => ['Ocramius\'s minimal API V3 client'], - 'Authorization' => ['bearer ' . $this->apiToken], + 'Authorization' => ['token ' . $this->apiToken], ], $request->getHeaders() ); diff --git a/test/unit/Github/Api/V3/SetDefaultBranchThroughApiCallTest.php b/test/unit/Github/Api/V3/SetDefaultBranchThroughApiCallTest.php index 5d0247d0..e5a79950 100644 --- a/test/unit/Github/Api/V3/SetDefaultBranchThroughApiCallTest.php +++ b/test/unit/Github/Api/V3/SetDefaultBranchThroughApiCallTest.php @@ -72,7 +72,7 @@ public function testSuccessfulRequest(): void 'Host' => ['the-domain.com'], 'Content-Type' => ['application/json'], 'User-Agent' => ['Ocramius\'s minimal API V3 client'], - 'Authorization' => ['bearer ' . $this->apiToken], + 'Authorization' => ['token ' . $this->apiToken], ], $request->getHeaders() ); @@ -117,7 +117,7 @@ public function testRequestFailedToSwitchBranch(): void 'Host' => ['the-domain.com'], 'Content-Type' => ['application/json'], 'User-Agent' => ['Ocramius\'s minimal API V3 client'], - 'Authorization' => ['bearer ' . $this->apiToken], + 'Authorization' => ['token ' . $this->apiToken], ], $request->getHeaders() );