Skip to content

Commit 84b8900

Browse files
authored
Merge pull request #1204 from php-api-clients/GitHubEnterpriseCloud/from-1.1.4-39135bdfcebfe58c32955a3638a37701-from-1.1.4-39135bdfcebfe58c32955a3638a37701
2 parents ac6be4a + a4723a3 commit 84b8900

36 files changed

+21464
-236
lines changed

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

Lines changed: 83 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "a520a0da1346bda8d17b35be14a878ac",
2+
"specHash": "39135bdfcebfe58c32955a3638a37701",
33
"generatedFiles": {
44
"files": [
55
{
@@ -2500,23 +2500,23 @@
25002500
},
25012501
{
25022502
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertCreated.php",
2503-
"hash": "fb780c88b7677fa0dbc6189bff831c4b"
2503+
"hash": "f562139a1776ded3609298250c48d193"
25042504
},
25052505
{
25062506
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertLocationCreated.php",
2507-
"hash": "da91ecc0a28aaba7da2554ebe704536e"
2507+
"hash": "6f99c2266bfb5108c45ed899cf7f1975"
25082508
},
25092509
{
25102510
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertLocationCreatedFormEncoded.php",
25112511
"hash": "c9164854c98a14195e2135d8d7bfa721"
25122512
},
25132513
{
25142514
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertReopened.php",
2515-
"hash": "3ec60f0303ecd81b8b583faada469048"
2515+
"hash": "7666fbfb61036fb4a8c67edc91e71eac"
25162516
},
25172517
{
25182518
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertResolved.php",
2519-
"hash": "d0f4a424db46223df52dc50258616a41"
2519+
"hash": "deb6012defbaa3d96aba7c438026aa5f"
25202520
},
25212521
{
25222522
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecurityAdvisoryPublished.php",
@@ -5980,7 +5980,7 @@
59805980
},
59815981
{
59825982
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php",
5983-
"hash": "ea53d5900ef20eeca40759702d1d7333"
5983+
"hash": "1f5d888ec9814c6c40653b15a9e3610d"
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": "342f51df759bc3b169373ca9aa71e6b3"
6031+
"hash": "36546bdb1886f1edad4827b566054a3e"
60326032
},
60336033
{
60346034
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php",
@@ -12272,7 +12272,7 @@
1227212272
},
1227312273
{
1227412274
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/SecretScanningAlertWebhook.php",
12275-
"hash": "eed1b33849b1d9ad890c8998882aaf45"
12275+
"hash": "e5ed66e67a5e474d5520ac310f3044fe"
1227612276
},
1227712277
{
1227812278
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet649F32EB\/TietC13659D6\/Tiet0B408A31\/TietF85C8E0E.php",
@@ -19880,15 +19880,15 @@
1988019880
},
1988119881
{
1988219882
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetContent.php",
19883-
"hash": "8589b053f27e8246ed3402288eb9cca5"
19883+
"hash": "51305c5e2d622da7b302803335c2af76"
1988419884
},
1988519885
{
1988619886
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetContent.php",
19887-
"hash": "ca99b59362450d0888107b29c2bdbc65"
19887+
"hash": "f90c50a6121ec256c7ad64750469231b"
1988819888
},
1988919889
{
1989019890
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetContentTest.php",
19891-
"hash": "eec9cb4a7fb516f70715e628aeef6386"
19891+
"hash": "3ee54549076638af8f37a1673489ee40"
1989219892
},
1989319893
{
1989419894
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/CreateOrUpdateFileContents.php",
@@ -26168,7 +26168,7 @@
2616826168
},
2616926169
{
2617026170
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php",
26171-
"hash": "8b937dbc6e2b383be1e23513f5df3807"
26171+
"hash": "e773de106d3ba1bc19422b7de412512e"
2617226172
},
2617326173
{
2617426174
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php",
@@ -26724,7 +26724,7 @@
2672426724
},
2672526725
{
2672626726
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
26727-
"hash": "f400a6ff2be0feb098a9b71470e5068d"
26727+
"hash": "5f77b6b31914d4c57038774b5b5dabe9"
2672826728
},
2672926729
{
2673026730
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -29100,7 +29100,7 @@
2910029100
},
2910129101
{
2910229102
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
29103-
"hash": "c327a33914c9241b505aaedfa15b6df9"
29103+
"hash": "8cce68830ed991b3941b78101f300828"
2910429104
},
2910529105
{
2910629106
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php",
@@ -29944,11 +29944,11 @@
2994429944
},
2994529945
{
2994629946
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
29947-
"hash": "6e951246c29d07718cedd307d17e8962"
29947+
"hash": "36bae5ed2f91045af7aeb4635beec851"
2994829948
},
2994929949
{
2995029950
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
29951-
"hash": "8c1248dc3f01ac14f5445023c9c3fa06"
29951+
"hash": "de1a3d881f8902981d2f2b6f52d877b3"
2995229952
},
2995329953
{
2995429954
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -30472,11 +30472,11 @@
3047230472
},
3047330473
{
3047430474
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningAlert.php",
30475-
"hash": "5f064a9a6a52f8080f76032a9f63a513"
30475+
"hash": "96c6c6810cd5665c5c71957cf6dbfc3d"
3047630476
},
3047730477
{
3047830478
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecretScanningAlertLocation.php",
30479-
"hash": "5a37b77931324fb74f0eb5032bbb2e46"
30479+
"hash": "9292e2f8dc06ee497cf7b6d9bce44eb2"
3048030480
},
3048130481
{
3048230482
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SecurityAdvisory.php",
@@ -30856,7 +30856,7 @@
3085630856
},
3085730857
{
3085830858
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookSecretScanningAlertValidated.php",
30859-
"hash": "c13139d8bdc70f9742bf7d0a5e9139c8"
30859+
"hash": "47c7b86ff02e2f68004732a56c1a9899"
3086030860
},
3086130861
{
3086230862
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Pages\/Deployments.php",
@@ -31969,6 +31969,70 @@
3196931969
{
3197031970
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Settings\/Billing\/Usage.php",
3197131971
"hash": "b837e85cc82e059525ccb9251865f8e7"
31972+
},
31973+
{
31974+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequestPushRulesetBypass.php",
31975+
"hash": "9ac660cbf51f8c525933dc7f3ec94b84"
31976+
},
31977+
{
31978+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanning.php",
31979+
"hash": "70097b39e3d852d41a83054280415526"
31980+
},
31981+
{
31982+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningMetadata.php",
31983+
"hash": "e3c72f6b05d0f4e27793319fa666bd7d"
31984+
},
31985+
{
31986+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionResponse.php",
31987+
"hash": "29ccd4b37dc286631d30c72b1f0c7bb0"
31988+
},
31989+
{
31990+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php",
31991+
"hash": "dcc1c1a51cb02699df29d3f83f6103b9"
31992+
},
31993+
{
31994+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php",
31995+
"hash": "1357ac50740aafed2ee94d1884d209f3"
31996+
},
31997+
{
31998+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php",
31999+
"hash": "8fc327e47aef16d4f679f9773096e9af"
32000+
},
32001+
{
32002+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCancelled.php",
32003+
"hash": "896faea1e9e679f2796477b19691ecea"
32004+
},
32005+
{
32006+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCompleted.php",
32007+
"hash": "6d3976cbad6f51518dba67e6982827f9"
32008+
},
32009+
{
32010+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCreated.php",
32011+
"hash": "b5b2a90680ddbd21fa5da1528228e3bf"
32012+
},
32013+
{
32014+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseDismissed.php",
32015+
"hash": "bbb5f5c209716b95872869ce43a2ad50"
32016+
},
32017+
{
32018+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseSubmitted.php",
32019+
"hash": "7cb671d54f8cebf10b09d8bc1e6f1a1b"
32020+
},
32021+
{
32022+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequestPushRulesetBypass\/Data.php",
32023+
"hash": "2fc8a982cce838a8c062df22a0bbf1a1"
32024+
},
32025+
{
32026+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanning\/Data.php",
32027+
"hash": "7ea2b845d83a1d30647dec41347d2a14"
32028+
},
32029+
{
32030+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/WebHook\/ExemptionRequestSecretScanning.php",
32031+
"hash": "287d4d993759e70edc3e54b4ad7fe6cb"
32032+
},
32033+
{
32034+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/ExemptionRequestSecretScanning.php",
32035+
"hash": "020be3539f4b8b0d336de08b6e6f60b0"
3197232036
}
3197332037
]
3197432038
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Attribute\CastUnionToType\Schema\ExemptionRequest;
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 ExemptionRequestData 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 === 'data|type' && $value['type'] === 'push_ruleset_bypass') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\ExemptionRequestPushRulesetBypass::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'data|type' && $value['type'] === 'secret_scanning') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanning::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
}
42+
43+
return $value;
44+
}
45+
}
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\ExemptionRequest;
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 Metadata 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 === 'label|reason' && ($value['reason'] === 'fixed_later' || $value['reason'] === 'false_positive' || $value['reason'] === 'tests')) {
29+
try {
30+
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningMetadata::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
}
35+
36+
return $value;
37+
}
38+
}

0 commit comments

Comments
 (0)