Skip to content

Commit 2f76f72

Browse files
authored
Merge pull request #1206 from php-api-clients/GitHubEnterpriseCloud/from-1.1.4-6061900a2a9a80fad8e347fe7f6f508a-from-1.1.4-6061900a2a9a80fad8e347fe7f6f508a
2 parents ae4cce0 + 82fde36 commit 2f76f72

File tree

30 files changed

+8475
-563
lines changed

30 files changed

+8475
-563
lines changed

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

Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "39135bdfcebfe58c32955a3638a37701",
2+
"specHash": "6061900a2a9a80fad8e347fe7f6f508a",
33
"generatedFiles": {
44
"files": [
55
{
@@ -5980,7 +5980,7 @@
59805980
},
59815981
{
59825982
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php",
5983-
"hash": "1f5d888ec9814c6c40653b15a9e3610d"
5983+
"hash": "24aa0a819f56bb460fb6383b42de4f4b"
59845984
},
59855985
{
59865986
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php",
@@ -6028,7 +6028,7 @@
60286028
},
60296029
{
60306030
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/WebHooks.php",
6031-
"hash": "36546bdb1886f1edad4827b566054a3e"
6031+
"hash": "3c17001f20be9350da3526a94328c608"
60326032
},
60336033
{
60346034
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php",
@@ -12208,15 +12208,15 @@
1220812208
},
1220912209
{
1221012210
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CopilotSeatDetails.php",
12211-
"hash": "4c0df85fe1b9dee2d779e2696ff4c3cf"
12211+
"hash": "f66e0827eda0a15d611f610f0c296a40"
1221212212
},
1221312213
{
1221412214
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Organization\/Plan.php",
1221512215
"hash": "b144158b8c6c23d002714b602059581c"
1221612216
},
1221712217
{
1221812218
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Copilot\/ListCopilotSeats\/Response\/ApplicationJson\/Ok.php",
12219-
"hash": "0e24d0000afcc62d45c8130b6cd7a0e2"
12219+
"hash": "f5805560074eb49d9501bfe7c267ced8"
1222012220
},
1222112221
{
1222212222
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietF5944C0A\/TietAA99D7D8\/Tiet9AE1F544\/TietA28F869C.php",
@@ -19688,23 +19688,23 @@
1968819688
},
1968919689
{
1969019690
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/ListCommits.php",
19691-
"hash": "aa168b348cb518a5ed7cd2c807bd2dc3"
19691+
"hash": "342aa2f0c235480a1b0c081d40000392"
1969219692
},
1969319693
{
1969419694
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/ListCommits.php",
19695-
"hash": "56da0b80bc2eda8b6929fc5e43de1b8c"
19695+
"hash": "8c788b6f0a03bd3f880c87b1aa790ae4"
1969619696
},
1969719697
{
1969819698
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/ListCommitsTest.php",
1969919699
"hash": "03f0bd69218b25e4714dcba34c7bdb04"
1970019700
},
1970119701
{
1970219702
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/ListCommitsListing.php",
19703-
"hash": "2bf995017d1e58302c7049f944a812a5"
19703+
"hash": "75fe50cea2f7f7b1c902f7b3ee6abf89"
1970419704
},
1970519705
{
1970619706
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/ListCommitsListing.php",
19707-
"hash": "09636bd87284a6297190b306a11cd284"
19707+
"hash": "adb3f483b5d6b7f5ad5dc0f3f78d514a"
1970819708
},
1970919709
{
1971019710
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/ListCommitsListingTest.php",
@@ -19884,7 +19884,7 @@
1988419884
},
1988519885
{
1988619886
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetContent.php",
19887-
"hash": "f90c50a6121ec256c7ad64750469231b"
19887+
"hash": "ca99b59362450d0888107b29c2bdbc65"
1988819888
},
1988919889
{
1989019890
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetContentTest.php",
@@ -26016,7 +26016,7 @@
2601626016
},
2601726017
{
2601826018
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/AssigningTeam.php",
26019-
"hash": "dc2ec809af2bbc4ff5d7ee6bb06fc05d"
26019+
"hash": "8e0f7ad10af32266ee20b87f08e4ad54"
2602026020
},
2602126021
{
2602226022
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/RepositoryRuleset\/Conditions.php",
@@ -26168,7 +26168,7 @@
2616826168
},
2616926169
{
2617026170
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php",
26171-
"hash": "e773de106d3ba1bc19422b7de412512e"
26171+
"hash": "85d0a9814970c8096d994051d3163686"
2617226172
},
2617326173
{
2617426174
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php",
@@ -26480,7 +26480,7 @@
2648026480
},
2648126481
{
2648226482
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php",
26483-
"hash": "c5558dce469c072e2a90be41c96ed8db"
26483+
"hash": "fa73b8cd1dc23d61c9f0fb17ad187258"
2648426484
},
2648526485
{
2648626486
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php",
@@ -26720,11 +26720,11 @@
2672026720
},
2672126721
{
2672226722
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
26723-
"hash": "0a3bd1955d6e93219dba943e6d14cdbd"
26723+
"hash": "b5b01eabc90ce8b140125b0a5bddb092"
2672426724
},
2672526725
{
2672626726
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
26727-
"hash": "5f77b6b31914d4c57038774b5b5dabe9"
26727+
"hash": "f400a6ff2be0feb098a9b71470e5068d"
2672826728
},
2672926729
{
2673026730
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -26820,7 +26820,7 @@
2682026820
},
2682126821
{
2682226822
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php",
26823-
"hash": "dc880ef38a537e30963c81bc90d8075f"
26823+
"hash": "77467a9b649d5e533b64857b47983363"
2682426824
},
2682526825
{
2682626826
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php",
@@ -27520,7 +27520,7 @@
2752027520
},
2752127521
{
2752227522
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Members\/Username\/Copilot.php",
27523-
"hash": "05fa33a84cb20743b3fe7de59b7b0ddf"
27523+
"hash": "afb66c716f6e721b8522fa52a2442ffa"
2752427524
},
2752527525
{
2752627526
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Memberships\/Username.php",
@@ -29100,7 +29100,7 @@
2910029100
},
2910129101
{
2910229102
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
29103-
"hash": "8cce68830ed991b3941b78101f300828"
29103+
"hash": "780db48630b2b4307ea92735ac4580a1"
2910429104
},
2910529105
{
2910629106
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php",
@@ -29804,7 +29804,7 @@
2980429804
},
2980529805
{
2980629806
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/OrgCustomProperty.php",
29807-
"hash": "b8a42a9749247e519d7f1db558b559fd"
29807+
"hash": "c19a69aac88f5f611a63c380a6f855a8"
2980829808
},
2980929809
{
2981029810
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CustomPropertyValue.php",
@@ -29816,11 +29816,11 @@
2981629816
},
2981729817
{
2981829818
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateOrUpdateCustomProperties\/Request\/ApplicationJson.php",
29819-
"hash": "3bc3146c25522630f7780486c40a31d1"
29819+
"hash": "84fe77ecc1eb2f956614dc3fb842fc42"
2982029820
},
2982129821
{
2982229822
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateOrUpdateCustomProperty\/Request\/ApplicationJson.php",
29823-
"hash": "e548e3bb32a04a511fc255290d1177b2"
29823+
"hash": "83111e53f819272b984045b1d46aee6b"
2982429824
},
2982529825
{
2982629826
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateOrUpdateCustomPropertiesValuesForRepos\/Request\/ApplicationJson.php",
@@ -29844,15 +29844,15 @@
2984429844
},
2984529845
{
2984629846
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyCreated.php",
29847-
"hash": "df901cda3e805b34e09b9ed7bb3eefc3"
29847+
"hash": "99d7a3d8a13bb4188c3b7e165de3fd4d"
2984829848
},
2984929849
{
2985029850
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyDeleted.php",
2985129851
"hash": "ded8e4e85ece7075aaa66f094cc45ba9"
2985229852
},
2985329853
{
2985429854
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyUpdated.php",
29855-
"hash": "46ebdca3ad41580969baaeb24c5ac526"
29855+
"hash": "810fba1b8d57d2c1925df8d6c5d65a05"
2985629856
},
2985729857
{
2985829858
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyValuesUpdated.php",
@@ -29944,11 +29944,11 @@
2994429944
},
2994529945
{
2994629946
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
29947-
"hash": "36bae5ed2f91045af7aeb4635beec851"
29947+
"hash": "e6238f5078269a5424befc2dade19934"
2994829948
},
2994929949
{
2995029950
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
29951-
"hash": "de1a3d881f8902981d2f2b6f52d877b3"
29951+
"hash": "6cdf9b5b5ec3eeb0397123b337d8001d"
2995229952
},
2995329953
{
2995429954
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -32033,6 +32033,22 @@
3203332033
{
3203432034
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/ExemptionRequestSecretScanning.php",
3203532035
"hash": "020be3539f4b8b0d336de08b6e6f60b0"
32036+
},
32037+
{
32038+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/EnterpriseTeam.php",
32039+
"hash": "8ee0e40d00b85af1a2fe279be0ffe991"
32040+
},
32041+
{
32042+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/Organization.php",
32043+
"hash": "460cdb375b8cfd9cde1f554f861fce58"
32044+
},
32045+
{
32046+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/WebHook\/ExemptionRequestPushRuleset.php",
32047+
"hash": "644f8e7407d580e83778883fd6125337"
32048+
},
32049+
{
32050+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/ExemptionRequestPushRuleset.php",
32051+
"hash": "3b8f6b858114e5db7733ae72cfd9d732"
3203632052
}
3203732053
]
3203832054
},

clients/GitHubEnterpriseCloud/src/Internal/Attribute/CastUnionToType/Schema/CopilotSeatDetails/AssigningTeam.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed
3131
} catch (Throwable) {
3232
}
3333
}
34+
35+
if ($signature === 'created_at|group_id|html_url|id|members_url|name|slug|sync_to_organizations|updated_at|url') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\EnterpriseTeam::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
3441
}
3542

3643
return $value;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Attribute\CastUnionToType\Schema\CopilotSeatDetails;
6+
7+
use ApiClients\Client\GitHubEnterpriseCloud\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Organization implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'avatar_url|description|events_url|hooks_url|id|issues_url|login|members_url|node_id|public_members_url|repos_url|url') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\OrganizationSimple::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}

0 commit comments

Comments
 (0)