Skip to content

Commit 3698933

Browse files
Fix incorrect team urls
1 parent e16a14c commit 3698933

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Github/Api/Copilot/Usage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function orgUsageSummary(string $organization, array $params = []): array
1414
public function orgTeamUsageSummary(string $organization, string $teamSlug, array $params = []): array
1515
{
1616
return $this->get(
17-
'/orgs/'.rawurlencode($organization).'/teams/'.rawurlencode($teamSlug).'/copilot/usage',
17+
'/orgs/'.rawurlencode($organization).'/team/'.rawurlencode($teamSlug).'/copilot/usage',
1818
$params
1919
);
2020
}
@@ -27,7 +27,7 @@ public function enterpriseUsageSummary(string $enterprise, array $params = []):
2727
public function enterpriseTeamUsageSummary(string $enterprise, string $teamSlug, array $params = []): array
2828
{
2929
return $this->get(
30-
'/enterprises/'.rawurlencode($enterprise).'/teams/'.rawurlencode($teamSlug).'/copilot/usage',
30+
'/enterprises/'.rawurlencode($enterprise).'/team/'.rawurlencode($teamSlug).'/copilot/usage',
3131
$params
3232
);
3333
}

test/Github/Tests/Api/Copilot/UsageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function shouldGetOrgTeamUsageSummary(): void
3333
$api = $this->getApiMock();
3434
$api->expects($this->once())
3535
->method('get')
36-
->with('/orgs/KnpLabs/teams/php-github-api/copilot/usage', [])
36+
->with('/orgs/KnpLabs/team/php-github-api/copilot/usage', [])
3737
->will($this->returnValue($expectedValue));
3838

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

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

0 commit comments

Comments
 (0)