Skip to content

Commit a8cb488

Browse files
authored
Merge pull request #1109 from php-api-clients/GitHubEnterprise-3.12/from-1.1.4-35f99fcef8f7403ddc9c418ae4de4c98-from-1.1.4-35f99fcef8f7403ddc9c418ae4de4c98
2 parents 69299f4 + 7641678 commit a8cb488

File tree

25 files changed

+232
-72
lines changed

25 files changed

+232
-72
lines changed

clients/GitHubEnterprise-3.12/etc/openapi-client-generator.state

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "c9dcf04fefb4b5b13d804c0813cc0047",
2+
"specHash": "35f99fcef8f7403ddc9c418ae4de4c98",
33
"generatedFiles": {
44
"files": [
55
{
@@ -7880,23 +7880,23 @@
78807880
},
78817881
{
78827882
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operation\/Git\/ListMatchingRefs.php",
7883-
"hash": "c9149b75249a55fa1e45d7e008c42e91"
7883+
"hash": "25dfeaf58366c6c56b966743fd98bee6"
78847884
},
78857885
{
78867886
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operator\/Git\/ListMatchingRefs.php",
7887-
"hash": "b01261f065b2b48acd6e9494e9b67424"
7887+
"hash": "d1e019f7caf4deb7217bd03bf5ccbed5"
78887888
},
78897889
{
78907890
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/tests\/\/Internal\/Operation\/Git\/ListMatchingRefsTest.php",
78917891
"hash": "e8d27e211e6d2ff8958eb90616da0de6"
78927892
},
78937893
{
78947894
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operation\/Git\/GetRef.php",
7895-
"hash": "16292ca8d1b9913e3269cd6581664827"
7895+
"hash": "b3338af621a6eb1b8531452589fd1740"
78967896
},
78977897
{
78987898
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operator\/Git\/GetRef.php",
7899-
"hash": "c63f464f4b5fcced23e084f3fa8ff0a0"
7899+
"hash": "f4b84b41cf537f8c83d8c4310ab81f39"
79007900
},
79017901
{
79027902
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/tests\/\/Internal\/Operation\/Git\/GetRefTest.php",
@@ -7916,23 +7916,23 @@
79167916
},
79177917
{
79187918
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operation\/Git\/DeleteRef.php",
7919-
"hash": "f975300498e3a7c9d05fb6b4a8206967"
7919+
"hash": "4777d04e86f84e37b3cbc51613c03a94"
79207920
},
79217921
{
79227922
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operator\/Git\/DeleteRef.php",
7923-
"hash": "b7dee67e0da841f04adb00531264640a"
7923+
"hash": "30f7fcf1d63adb98427ac1f7407ed09e"
79247924
},
79257925
{
79267926
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/tests\/\/Internal\/Operation\/Git\/DeleteRefTest.php",
79277927
"hash": "645a96ed4d2bbb9689dfea498c0bbccb"
79287928
},
79297929
{
79307930
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operation\/Git\/UpdateRef.php",
7931-
"hash": "c7f3b58d99dde1ce1ed3a4e42aa65736"
7931+
"hash": "52b6d0240a553230150a2b646c3a2e89"
79327932
},
79337933
{
79347934
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Operator\/Git\/UpdateRef.php",
7935-
"hash": "1b719f23a084f0a04e31a6307372387c"
7935+
"hash": "a860a5826a9ad2bfc63b3fe7340fccec"
79367936
},
79377937
{
79387938
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/tests\/\/Internal\/Operation\/Git\/UpdateRefTest.php",
@@ -15240,7 +15240,7 @@
1524015240
},
1524115241
{
1524215242
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/WebhookMemberAdded.php",
15243-
"hash": "76490ec68cb3f80823bb901224b34da6"
15243+
"hash": "6d8391cd516816eb3c31ebfbb7ada37c"
1524415244
},
1524515245
{
1524615246
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/WebhookMemberEdited.php",
@@ -22016,11 +22016,11 @@
2201622016
},
2201722017
{
2201822018
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/WebhookMemberAdded\/Changes.php",
22019-
"hash": "0fec00126025c030a2fea4d6f9fa45b3"
22019+
"hash": "fcfb8ca963db11ee98f61b2e416131ef"
2202022020
},
2202122021
{
2202222022
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/WebhookMemberAdded\/Changes\/Permission.php",
22023-
"hash": "39bef951c143a45371709ec256691a6b"
22023+
"hash": "b122a714ffd4895313d610fd1c86c1e5"
2202422024
},
2202522025
{
2202622026
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/WebhookMemberEdited\/Changes.php",
@@ -27196,7 +27196,7 @@
2719627196
},
2719727197
{
2719827198
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Git.php",
27199-
"hash": "7b88b9fd793fbe6078d2008f7e39d1f3"
27199+
"hash": "eaf58f409aaed8d29894edd171e16a3e"
2720027200
},
2720127201
{
2720227202
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/List\/EnterpriseAdmin.php",
@@ -27424,7 +27424,7 @@
2742427424
},
2742527425
{
2742627426
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Git.php",
27427-
"hash": "3ef1b2cbc19f53ebe14d56f091fcc5ba"
27427+
"hash": "32661e442809ef257b45820342388752"
2742827428
},
2742927429
{
2743027430
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Issues.php",
@@ -27512,7 +27512,7 @@
2751227512
},
2751327513
{
2751427514
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Git.php",
27515-
"hash": "0532e4a4109ae87c7431b6e9caa6256a"
27515+
"hash": "7563c788a333e452f3f42ec97eae7e46"
2751627516
},
2751727517
{
2751827518
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Users.php",
@@ -27620,7 +27620,7 @@
2762027620
},
2762127621
{
2762227622
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
27623-
"hash": "ec33fde83984851f3c91f4257489068f"
27623+
"hash": "e495daa2da33f25173ceeef9d4a008da"
2762427624
},
2762527625
{
2762627626
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php",
@@ -27720,7 +27720,7 @@
2772027720
},
2772127721
{
2772227722
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Seven.php",
27723-
"hash": "faf0961379ff76c9b86543aaf4e416a4"
27723+
"hash": "a4febd7d113b240c469f2b81c4ec79ae"
2772427724
},
2772527725
{
2772627726
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Six.php",
@@ -27756,7 +27756,7 @@
2775627756
},
2775727757
{
2775827758
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php",
27759-
"hash": "a3f89ba447b1e68f11c964956153fa89"
27759+
"hash": "303727a57af72dd1a1c567eb2a0220f1"
2776027760
},
2776127761
{
2776227762
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Nine.php",
@@ -27820,11 +27820,11 @@
2782027820
},
2782127821
{
2782227822
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27823-
"hash": "67362eb80701f5b3168efce03625796c"
27823+
"hash": "a591eacc647c8ec5f02b91ca9ff3e1b7"
2782427824
},
2782527825
{
2782627826
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27827-
"hash": "9d5e3470f54dd9c93b12ba6f2fa7f1b7"
27827+
"hash": "fa16284fa01b3eb981d9f8132aa056db"
2782827828
},
2782927829
{
2783027830
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27864,7 +27864,7 @@
2786427864
},
2786527865
{
2786627866
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Operation\/Actions.php",
27867-
"hash": "409ed65bb662ee010d354057cc072caa"
27867+
"hash": "896b1f5c6516371d759abf61887a73b8"
2786827868
},
2786927869
{
2787027870
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Operation\/CodeScanning.php",
@@ -27956,7 +27956,7 @@
2795627956
},
2795727957
{
2795827958
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Operation\/Git.php",
27959-
"hash": "5a443aa23db0a8a7c61bc7e8989408f2"
27959+
"hash": "142d5310255affe47ba2af32511cf2f1"
2796027960
},
2796127961
{
2796227962
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Operation\/Pulls.php",
@@ -30376,7 +30376,7 @@
3037630376
},
3037730377
{
3037830378
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Member.php",
30379-
"hash": "0d44b56583b045e21901839560dea33b"
30379+
"hash": "4adb62fc38d6e4d137708f55e3b87495"
3038030380
},
3038130381
{
3038230382
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Membership.php",
@@ -30536,7 +30536,7 @@
3053630536
},
3053730537
{
3053830538
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
30539-
"hash": "750a18046bde39374a6214e65ad049ca"
30539+
"hash": "fc88bad4e153729fca1cc8fc5eb724fe"
3054030540
},
3054130541
{
3054230542
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Environments\/EnvironmentName\/Secrets.php",
@@ -30561,6 +30561,10 @@
3056130561
{
3056230562
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/RepositoryRuleParamsThresholds.php",
3056330563
"hash": "eb9fd97fe114be9a17623e7bf67e00b5"
30564+
},
30565+
{
30566+
"name": ".\/clients\/GitHubEnterprise-3.12\/etc\/..\/\/src\/\/Schema\/WebhookMemberAdded\/Changes\/RoleName.php",
30567+
"hash": "828e0e3e5a94b62c05aafcf79ffe4c5a"
3056430568
}
3056530569
]
3056630570
},

clients/GitHubEnterprise-3.12/src/Internal/Hydrator/WebHook/Member.php

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded;
1818
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes;
1919
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\Permission;
20+
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName;
2021
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberEdited;
2122
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberEdited\Changes\OldPermission;
2223
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberRemoved;
@@ -58,6 +59,7 @@ public function hydrateObject(string $className, array $payload): object
5859
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded($payload),
5960
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes($payload),
6061
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\Permission' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️Permission($payload),
62+
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($payload),
6163
'ApiClients\Client\GitHubEnterprise\Schema\EnterpriseWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks($payload),
6264
'ApiClients\Client\GitHubEnterprise\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleInstallation($payload),
6365
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Member' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Member($payload),
@@ -275,6 +277,26 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
275277
$properties['permission'] = $value;
276278

277279
after_permission:
280+
281+
$value = $payload['role_name'] ?? null;
282+
283+
if ($value === null) {
284+
$properties['roleName'] = null;
285+
goto after_roleName;
286+
}
287+
288+
if (is_array($value)) {
289+
try {
290+
$this->hydrationStack[] = 'roleName';
291+
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($value);
292+
} finally {
293+
array_pop($this->hydrationStack);
294+
}
295+
}
296+
297+
$properties['roleName'] = $value;
298+
299+
after_roleName:
278300
} catch (Throwable $exception) {
279301
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes', $exception, stack: $this->hydrationStack);
280302
}
@@ -320,6 +342,36 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
320342
}
321343
}
322344

345+
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName(array $payload): RoleName
346+
{
347+
$properties = [];
348+
$missingFields = [];
349+
try {
350+
$value = $payload['to'] ?? null;
351+
352+
if ($value === null) {
353+
$missingFields[] = 'to';
354+
goto after_to;
355+
}
356+
357+
$properties['to'] = $value;
358+
359+
after_to:
360+
} catch (Throwable $exception) {
361+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName', $exception, stack: $this->hydrationStack);
362+
}
363+
364+
if (count($missingFields) > 0) {
365+
throw UnableToHydrateObject::dueToMissingFields(RoleName::class, $missingFields, stack: $this->hydrationStack);
366+
}
367+
368+
try {
369+
return new RoleName(...$properties);
370+
} catch (Throwable $exception) {
371+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName', $exception, stack: $this->hydrationStack);
372+
}
373+
}
374+
323375
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks(array $payload): EnterpriseWebhooks
324376
{
325377
$properties = [];
@@ -4972,6 +5024,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
49725024
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded($object),
49735025
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes($object),
49745026
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\Permission' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️Permission($object),
5027+
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($object),
49755028
'ApiClients\Client\GitHubEnterprise\Schema\EnterpriseWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks($object),
49765029
'ApiClients\Client\GitHubEnterprise\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleInstallation($object),
49775030
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Member' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Member($object),
@@ -5131,6 +5184,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
51315184
$permission = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️Permission($permission);
51325185
after_permission: $result['permission'] = $permission;
51335186

5187+
$roleName = $object->roleName;
5188+
5189+
if ($roleName === null) {
5190+
goto after_roleName;
5191+
}
5192+
5193+
$roleName = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($roleName);
5194+
after_roleName: $result['role_name'] = $roleName;
5195+
51345196
return $result;
51355197
}
51365198

@@ -5145,6 +5207,17 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
51455207
return $result;
51465208
}
51475209

5210+
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName(mixed $object): mixed
5211+
{
5212+
assert($object instanceof RoleName);
5213+
$result = [];
5214+
5215+
$to = $object->to;
5216+
after_to: $result['to'] = $to;
5217+
5218+
return $result;
5219+
}
5220+
51485221
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks(mixed $object): mixed
51495222
{
51505223
assert($object instanceof EnterpriseWebhooks);

0 commit comments

Comments
 (0)