Skip to content

Commit d61f5cb

Browse files
authored
Merge pull request #1246 from php-api-clients/GitHub/from-1.1.4-b5681abce03354e41943d59e8d8bc4a6-from-1.1.4-b5681abce03354e41943d59e8d8bc4a6
2 parents 25231a1 + 26b2498 commit d61f5cb

File tree

38 files changed

+2115
-2064
lines changed

38 files changed

+2115
-2064
lines changed

clients/GitHub/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,66 @@ $client->operations()->secretScanning()->listAlertsForEnterprise( enterpr
990990
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-enterprise).
991991

992992

993+
### copilot/usage-metrics-for-enterprise-team
994+
995+
Get a summary of Copilot usage for an enterprise team
996+
997+
Using the `call` method:
998+
```php
999+
$client->call('GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage', [
1000+
'enterprise' => 'generated',
1001+
'team_slug' => 'generated',
1002+
'since' => 'generated',
1003+
'until' => 'generated',
1004+
'page' => 1,
1005+
'per_page' => 8,
1006+
]);
1007+
```
1008+
1009+
Operations method:
1010+
```php
1011+
$client->operations()->copilot()->usageMetricsForEnterpriseTeam( enterprise: 'generated',
1012+
team_slug: 'generated',
1013+
since: 'generated',
1014+
until: 'generated',
1015+
page: 1,
1016+
per_page: 8,
1017+
);
1018+
```
1019+
1020+
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-an-enterprise-team).
1021+
1022+
1023+
### copilot/usage-metrics-for-enterprise-team
1024+
1025+
Get a summary of Copilot usage for an enterprise team
1026+
1027+
Using the `call` method:
1028+
```php
1029+
$client->call('LIST /enterprises/{enterprise}/team/{team_slug}/copilot/usage', [
1030+
'enterprise' => 'generated',
1031+
'team_slug' => 'generated',
1032+
'since' => 'generated',
1033+
'until' => 'generated',
1034+
'page' => 1,
1035+
'per_page' => 8,
1036+
]);
1037+
```
1038+
1039+
Operations method:
1040+
```php
1041+
$client->operations()->copilot()->usageMetricsForEnterpriseTeamListing( enterprise: 'generated',
1042+
team_slug: 'generated',
1043+
since: 'generated',
1044+
until: 'generated',
1045+
page: 1,
1046+
per_page: 8,
1047+
);
1048+
```
1049+
1050+
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-an-enterprise-team).
1051+
1052+
9931053
### activity/list-public-events
9941054

9951055
List public events

clients/GitHub/etc/openapi-client-generator.state

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "258d33610c11c1d10d29617d894e1ce8",
2+
"specHash": "b5681abce03354e41943d59e8d8bc4a6",
33
"generatedFiles": {
44
"files": [
55
{
@@ -256,7 +256,7 @@
256256
},
257257
{
258258
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ApiOverview.php",
259-
"hash": "6c6374d14557787602804bd2f302d374"
259+
"hash": "5f7b17c0f0bb6b1d3af818db9f1faabb"
260260
},
261261
{
262262
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecurityAndAnalysis.php",
@@ -4624,7 +4624,7 @@
46244624
},
46254625
{
46264626
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateInOrg\/Request\/ApplicationJson.php",
4627-
"hash": "fb07366e9a5a257d4bf4e8098cda9621"
4627+
"hash": "a6ada34a205d87d7a69adf1649cea29b"
46284628
},
46294629
{
46304630
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateOrgRuleset\/Request\/ApplicationJson.php",
@@ -4736,7 +4736,7 @@
47364736
},
47374737
{
47384738
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/Update\/Request\/ApplicationJson.php",
4739-
"hash": "c9203441c1bac6f7b5d2f53f690af6f9"
4739+
"hash": "6b28384df87302af409903a97ec0a8f5"
47404740
},
47414741
{
47424742
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/Update\/Request\/ApplicationJson\/SecurityAndAnalysis.php",
@@ -5492,7 +5492,7 @@
54925492
},
54935493
{
54945494
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateForAuthenticatedUser\/Request\/ApplicationJson.php",
5495-
"hash": "51bfe6a044dec4b097a97a79e35ea130"
5495+
"hash": "be4c75e517681ac4a3eeed7d924701cd"
54965496
},
54975497
{
54985498
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Users\/AddSocialAccountForAuthenticatedUser\/Request\/ApplicationJson.php",
@@ -5520,7 +5520,7 @@
55205520
},
55215521
{
55225522
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Client.php",
5523-
"hash": "2fa79ff4a10c8c47be90d9f0f0526dae"
5523+
"hash": "65d2596dd07160059ecefb8b316d05cd"
55245524
},
55255525
{
55265526
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/OperationsInterface.php",
@@ -11678,21 +11678,13 @@
1167811678
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationDetails.php",
1167911679
"hash": "0609c00665283fb0720f16bc99656890"
1168011680
},
11681-
{
11682-
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Organization.php",
11683-
"hash": "eaeafd474fcd86fcab5734de58de1039"
11684-
},
1168511681
{
1168611682
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotSeatDetails.php",
11687-
"hash": "92e2a1ef84e4c3e5b25451da72311a94"
11688-
},
11689-
{
11690-
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Organization\/Plan.php",
11691-
"hash": "2c844af6f534301f4c76567e51769f88"
11683+
"hash": "45ea17da364c6d93645ba99ff27df1d8"
1169211684
},
1169311685
{
1169411686
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Copilot\/ListCopilotSeats\/Response\/ApplicationJson\/Ok.php",
11695-
"hash": "24daee07f3e46d924018ae9cc0c0c94d"
11687+
"hash": "e79f2f53fbd57620603ac59c891eb4b2"
1169611688
},
1169711689
{
1169811690
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietF5944C0A\/TietAA99D7D8\/Tiet9AE1F544\/TietA28F869C.php",
@@ -11724,7 +11716,7 @@
1172411716
},
1172511717
{
1172611718
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Copilot.php",
11727-
"hash": "a0b9fc7025d2ed3c01515fc3f4285499"
11719+
"hash": "eae816e0c48c6fa4021b89839b99e0e3"
1172811720
},
1172911721
{
1173011722
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CheckAutomatedSecurityFixes.php",
@@ -24532,7 +24524,7 @@
2453224524
},
2453324525
{
2453424526
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Copilot.php",
24535-
"hash": "b168d44133dfb1a578f90bd0efddc7d6"
24527+
"hash": "8b936b37b66653bfe68e7d5c9e903dbe"
2453624528
},
2453724529
{
2453824530
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php",
@@ -24736,7 +24728,7 @@
2473624728
},
2473724729
{
2473824730
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Issues.php",
24739-
"hash": "7af98c768f317bdd2add781ec3b1df69"
24731+
"hash": "68177dac6998d98b39d7a64e6e5fe1e7"
2474024732
},
2474124733
{
2474224734
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Migrations.php",
@@ -24748,11 +24740,11 @@
2474824740
},
2474924741
{
2475024742
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Packages.php",
24751-
"hash": "4ab93017e3894ec5748c61024d8a46d7"
24743+
"hash": "c1e365780b7caff87f52fba60b0d3d38"
2475224744
},
2475324745
{
2475424746
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php",
24755-
"hash": "8afd666358a93bb89c0ae944fe11a6a2"
24747+
"hash": "58feacbb3f5aceff6543f0db3e7d382f"
2475624748
},
2475724749
{
2475824750
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php",
@@ -24780,15 +24772,15 @@
2478024772
},
2478124773
{
2478224774
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Pulls.php",
24783-
"hash": "4d5b0ded5e8b8499670796a1044ee65e"
24775+
"hash": "9351b184edbadf5a3e74cf6bbbd2691e"
2478424776
},
2478524777
{
2478624778
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Dependabot.php",
2478724779
"hash": "2904f5501d22f0bb18e658d6ae9e32e0"
2478824780
},
2478924781
{
2479024782
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Reactions.php",
24791-
"hash": "c18fb98765e15fb2f499c11e2a6ab538"
24783+
"hash": "205b5fc6cc89470698b5f79a6c551928"
2479224784
},
2479324785
{
2479424786
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Checks.php",
@@ -24976,7 +24968,7 @@
2497624968
},
2497724969
{
2497824970
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
24979-
"hash": "004122fbb6a1f96d6a0c2801a632c588"
24971+
"hash": "d6f9d7d9cf0b5127d80c1b292b76a01b"
2498024972
},
2498124973
{
2498224974
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php",
@@ -25080,7 +25072,7 @@
2508025072
},
2508125073
{
2508225074
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php",
25083-
"hash": "f15289e9f2df163f19fb9f360950c959"
25075+
"hash": "0d048e7679a28ebc3cbaab5f44636b07"
2508425076
},
2508525077
{
2508625078
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Eight.php",
@@ -25172,11 +25164,11 @@
2517225164
},
2517325165
{
2517425166
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Routers.php",
25175-
"hash": "da13c6ba2c5c877b7303e9e941265954"
25167+
"hash": "f98fef4178bc1cb79f6b89386de8e0ea"
2517625168
},
2517725169
{
2517825170
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operators.php",
25179-
"hash": "948d837a16c9556164aba7711b2020c2"
25171+
"hash": "622af053a71a71b62a3ba4651ff536db"
2518025172
},
2518125173
{
2518225174
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php",
@@ -25352,7 +25344,7 @@
2535225344
},
2535325345
{
2535425346
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Meta.php",
25355-
"hash": "3e215e4d43c9a354a82970e26246657b"
25347+
"hash": "c6f0c50324b9d3abdb985ff4d78ca00b"
2535625348
},
2535725349
{
2535825350
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Networks\/Owner\/Repo\/Events.php",
@@ -25620,7 +25612,7 @@
2562025612
},
2562125613
{
2562225614
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Members\/Username\/Copilot.php",
25623-
"hash": "f8ac03c8d91928df010947fd46f09c52"
25615+
"hash": "2f0b8a8969eeb68cfbf80e93827c9db3"
2562425616
},
2562525617
{
2562625618
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Memberships\/Username.php",
@@ -27168,7 +27160,7 @@
2716827160
},
2716927161
{
2717027162
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
27171-
"hash": "11381cbdcb181eb75fe005455ce94cce"
27163+
"hash": "ab092ae2227ed736d11434cf17d36773"
2717227164
},
2717327165
{
2717427166
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php",
@@ -27388,7 +27380,7 @@
2738827380
},
2738927381
{
2739027382
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/Assignee.php",
27391-
"hash": "cb674d6a95a110d5eab87192005b0d43"
27383+
"hash": "97bb887016552fb64fd21ab77e81a916"
2739227384
},
2739327385
{
2739427386
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicyNamePatternWithType.php",
@@ -27788,11 +27780,11 @@
2778827780
},
2778927781
{
2779027782
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27791-
"hash": "c06de68a2d5065e055a7200b0f4e2b5d"
27783+
"hash": "2dac8d6824cdb9a032de120fac8e5b75"
2779227784
},
2779327785
{
2779427786
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27795-
"hash": "1b3588a342742c08a3fe943b1886b3c4"
27787+
"hash": "9161ea27ab511d49e7c518b43f27d4b8"
2779627788
},
2779727789
{
2779827790
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -28832,7 +28824,7 @@
2883228824
},
2883328825
{
2883428826
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Copilot.php",
28835-
"hash": "a4bc9908dbe0029801e8ca022969c2d3"
28827+
"hash": "d6fd0fdf4414bbaf810ab2c00e35b6e5"
2883628828
},
2883728829
{
2883828830
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Copilot\/Usage.php",
@@ -29632,7 +29624,7 @@
2963229624
},
2963329625
{
2963429626
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Copilot\/ListCopilotSeatsForEnterprise\/Response\/ApplicationJson\/Ok.php",
29635-
"hash": "e56860ef1e46c65d051b19c5e30e6480"
29627+
"hash": "6157f73720a2d7f0dd4f983cc6d487e5"
2963629628
},
2963729629
{
2963829630
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Copilot\/Billing\/Seats.php",
@@ -30269,6 +30261,34 @@
3026930261
{
3027030262
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset\/Rules\/Eighteen\/Parameters.php",
3027130263
"hash": "e1f28caa9eb8cadf96ff706a4ea2b302"
30264+
},
30265+
{
30266+
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Copilot\/UsageMetricsForEnterpriseTeam.php",
30267+
"hash": "247600d098773436d2eae0d452697e68"
30268+
},
30269+
{
30270+
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Copilot\/UsageMetricsForEnterpriseTeam.php",
30271+
"hash": "93c5ff91ebc5037b265c25b2d5a761e0"
30272+
},
30273+
{
30274+
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Copilot\/UsageMetricsForEnterpriseTeamTest.php",
30275+
"hash": "acfa68749f56be7d8c0a9849d0d4a3bc"
30276+
},
30277+
{
30278+
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Copilot\/UsageMetricsForEnterpriseTeamListing.php",
30279+
"hash": "93d052d3e6f94d203e9c83af555189fc"
30280+
},
30281+
{
30282+
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Copilot\/UsageMetricsForEnterpriseTeamListing.php",
30283+
"hash": "cc44d2af63389bf87432f1584ebb22ed"
30284+
},
30285+
{
30286+
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Copilot\/UsageMetricsForEnterpriseTeamListingTest.php",
30287+
"hash": "3eba1d23274dd9d7c7ef7ff8e3d04268"
30288+
},
30289+
{
30290+
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Team\/TeamSlug\/Copilot\/Usage.php",
30291+
"hash": "3f202db72777733607abe67c7ebe47f0"
3027230292
}
3027330293
]
3027430294
},

clients/GitHub/src/Client.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,18 +231,18 @@ public function call(string $call, array $params = []): \ApiClients\Client\GitHu
231231
}
232232

233233
return $this->router[Internal\Router\List\Five::class]->call($call, $params, $pathChunks);
234-
} elseif ($pathChunksCount === 6) {
235-
if (\array_key_exists(Internal\Router\List\Six::class, $this->router) === false) {
236-
$this->router[Internal\Router\List\Six::class] = new Internal\Router\List\Six(routers: $this->routers);
237-
}
238-
239-
return $this->router[Internal\Router\List\Six::class]->call($call, $params, $pathChunks);
240234
} elseif ($pathChunksCount === 7) {
241235
if (\array_key_exists(Internal\Router\List\Seven::class, $this->router) === false) {
242236
$this->router[Internal\Router\List\Seven::class] = new Internal\Router\List\Seven(routers: $this->routers);
243237
}
244238

245239
return $this->router[Internal\Router\List\Seven::class]->call($call, $params, $pathChunks);
240+
} elseif ($pathChunksCount === 6) {
241+
if (\array_key_exists(Internal\Router\List\Six::class, $this->router) === false) {
242+
$this->router[Internal\Router\List\Six::class] = new Internal\Router\List\Six(routers: $this->routers);
243+
}
244+
245+
return $this->router[Internal\Router\List\Six::class]->call($call, $params, $pathChunks);
246246
} elseif ($pathChunksCount === 8) {
247247
if (\array_key_exists(Internal\Router\List\Eight::class, $this->router) === false) {
248248
$this->router[Internal\Router\List\Eight::class] = new Internal\Router\List\Eight(routers: $this->routers);

clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/Assignee.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed
3131
} catch (Throwable) {
3232
}
3333
}
34-
35-
if ($signature === 'description|html_url|id|members_url|name|node_id|notification_setting|parent|permission|permissions|privacy|repositories_url|slug|url') {
36-
try {
37-
return $hydrator->hydrateObject(Schema\Team::class, $value);
38-
} catch (Throwable) {
39-
}
40-
}
41-
42-
if ($signature === 'avatar_url|blog|company|created_at|description|email|events_url|followers|following|has_organization_projects|has_repository_projects|hooks_url|html_url|id|is_verified|issues_url|location|login|members_url|name|node_id|plan|public_gists|public_members_url|public_repos|repos_url|type|updated_at|url') {
43-
try {
44-
return $hydrator->hydrateObject(Schema\Organization::class, $value);
45-
} catch (Throwable) {
46-
}
47-
}
4834
}
4935

5036
return $value;

0 commit comments

Comments
 (0)