Skip to content

Commit 4f7d08d

Browse files
authored
bug KnpLabs#1056 fix(Apps): use /orgs/ORG/installation (ellisio)
This PR was merged into the 3.4.x-dev branch. Discussion ---------- According to [the documentation](https://docs.github.com/en/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app) this should be `/orgs/ORG/installation`, not `/org/ORG/installation`. Using the singular version results in `Bad credentials` when using a valid JWT for the GitHub App. Commits ------- 4d53365 fix(Apps): use /orgs/ORG/installation
2 parents c258cc0 + 4d53365 commit 4f7d08d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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
/**

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'));

0 commit comments

Comments
 (0)