Skip to content

Commit

Permalink
Fix incorrect team urls
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-webart committed Sep 3, 2024
1 parent e16a14c commit 3698933
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Github/Api/Copilot/Usage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function orgUsageSummary(string $organization, array $params = []): array
public function orgTeamUsageSummary(string $organization, string $teamSlug, array $params = []): array
{
return $this->get(
'/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($teamSlug).'/copilot/usage',
'/orgs/'.rawurlencode($organization).'/team/'.rawurlencode($teamSlug).'/copilot/usage',
$params
);
}
Expand All @@ -27,7 +27,7 @@ public function enterpriseUsageSummary(string $enterprise, array $params = []):
public function enterpriseTeamUsageSummary(string $enterprise, string $teamSlug, array $params = []): array
{
return $this->get(
'/enterprises/'.rawurlencode($enterprise).'/teams/'.rawurlencode($teamSlug).'/copilot/usage',
'/enterprises/'.rawurlencode($enterprise).'/team/'.rawurlencode($teamSlug).'/copilot/usage',
$params
);
}
Expand Down
4 changes: 2 additions & 2 deletions test/Github/Tests/Api/Copilot/UsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function shouldGetOrgTeamUsageSummary(): void
$api = $this->getApiMock();
$api->expects($this->once())
->method('get')
->with('/orgs/KnpLabs/teams/php-github-api/copilot/usage', [])
->with('/orgs/KnpLabs/team/php-github-api/copilot/usage', [])
->will($this->returnValue($expectedValue));

$this->assertEquals($expectedValue, $api->orgTeamUsageSummary('KnpLabs', 'php-github-api'));
Expand Down Expand Up @@ -65,7 +65,7 @@ public function shouldGetEnterpriseTeamUsageSummary(): void
$api = $this->getApiMock();
$api->expects($this->once())
->method('get')
->with('/enterprises/KnpLabs/teams/php-github-api/copilot/usage', [])
->with('/enterprises/KnpLabs/team/php-github-api/copilot/usage', [])
->will($this->returnValue($expectedValue));

$this->assertEquals($expectedValue, $api->enterpriseTeamUsageSummary('KnpLabs', 'php-github-api'));
Expand Down

0 comments on commit 3698933

Please sign in to comment.