Skip to content

Commit fbb9730

Browse files
authored
Merge pull request #1543 from php-api-clients/GitHubEnterprise-3.14/from-1.1.4-d5ac2a68d76d323d5182cd11d4daf614-from-1.1.4-d5ac2a68d76d323d5182cd11d4daf614
2 parents 9ca6a19 + dfce36e commit fbb9730

33 files changed

+780
-117
lines changed

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

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "1716058b6fa04c91e7ec9ca76a7996d2",
2+
"specHash": "d5ac2a68d76d323d5182cd11d4daf614",
33
"generatedFiles": {
44
"files": [
55
{
@@ -7764,7 +7764,7 @@
77647764
},
77657765
{
77667766
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/DependencyGraph\/DiffRange.php",
7767-
"hash": "9bf7067713932c3221d92f2191b26a14"
7767+
"hash": "075b6038151ce73c38ee1b662312e485"
77687768
},
77697769
{
77707770
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/DependencyGraph\/DiffRangeTest.php",
@@ -11080,7 +11080,7 @@
1108011080
},
1108111081
{
1108211082
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/Search\/IssuesAndPullRequests.php",
11083-
"hash": "7e529f8c1df4812ca8b2791054142b14"
11083+
"hash": "271c14cfe4f6b4e11e2808f7726ba9c2"
1108411084
},
1108511085
{
1108611086
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/Search\/IssuesAndPullRequestsTest.php",
@@ -13300,7 +13300,7 @@
1330013300
},
1330113301
{
1330213302
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/Meta\/GetZen.php",
13303-
"hash": "6e8ac5284c1f5b9ab767845a753174bb"
13303+
"hash": "d9d04364b4b5d6c1dd1936d1c8c4e727"
1330413304
},
1330513305
{
1330613306
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/Meta\/GetZenTest.php",
@@ -15372,15 +15372,15 @@
1537215372
},
1537315373
{
1537415374
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php",
15375-
"hash": "53f53943e63e4cf9eb63a983ce3155ac"
15375+
"hash": "1fc2f779d08ed5752c34175a6d602409"
1537615376
},
1537715377
{
1537815378
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php",
15379-
"hash": "e8b5241ea2c5d1fe3e0dfbd49fc47891"
15379+
"hash": "838b43367eb6df1a6caf3240812fc8e5"
1538015380
},
1538115381
{
1538215382
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php",
15383-
"hash": "e1855e2c3bbb1d3d4a53733457d99513"
15383+
"hash": "5658982cf775d944e65e8d66e337f54f"
1538415384
},
1538515385
{
1538615386
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/SimpleCheckSuite.php",
@@ -16312,23 +16312,23 @@
1631216312
},
1631316313
{
1631416314
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCancelled.php",
16315-
"hash": "edefa3dbd7c5b407f2d1c03d60482ad1"
16315+
"hash": "36d4e2bcb0b8555e69fb368fffe621db"
1631616316
},
1631716317
{
1631816318
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCompleted.php",
16319-
"hash": "af0915206fe5aabde670a295480d7c20"
16319+
"hash": "51703b9377384f2516a435a0f6b6b3a5"
1632016320
},
1632116321
{
1632216322
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCreated.php",
16323-
"hash": "f4142b24f2a8f13a230376433973c333"
16323+
"hash": "a7b75c5d3a2e28dc1d5790a7e3d39929"
1632416324
},
1632516325
{
1632616326
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseDismissed.php",
16327-
"hash": "131717c3d8fe99c1f45f4c81f95d229c"
16327+
"hash": "963400e0201e833d39a9e16cb083e16b"
1632816328
},
1632916329
{
1633016330
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseSubmitted.php",
16331-
"hash": "64ea2641341370810c16bc975389d2c3"
16331+
"hash": "f1547141e84d98787f827a2513bf92aa"
1633216332
},
1633316333
{
1633416334
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookCacheSync.php",
@@ -17032,7 +17032,7 @@
1703217032
},
1703317033
{
1703417034
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited.php",
17035-
"hash": "add62946b58100404ecc0f9c09a415b5"
17035+
"hash": "b7e0fa47428f4699414263e21754a2e4"
1703617036
},
1703717037
{
1703817038
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleasePrereleased.php",
@@ -24216,7 +24216,7 @@
2421624216
},
2421724217
{
2421824218
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes.php",
24219-
"hash": "e186f35fa3eb635d2abe20d9e4cab01d"
24219+
"hash": "77c6c61ecf25f37254d59dd5b1d01406"
2422024220
},
2422124221
{
2422224222
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/MakeLatest.php",
@@ -26692,7 +26692,7 @@
2669226692
},
2669326693
{
2669426694
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Meta.php",
26695-
"hash": "79885a9c2e3f9d127ab68bfef21f8105"
26695+
"hash": "4bfec77db1fdd948564bf8bbf8b4eb90"
2669626696
},
2669726697
{
2669826698
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/EnterpriseAdmin.php",
@@ -26736,7 +26736,7 @@
2673626736
},
2673726737
{
2673826738
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Search.php",
26739-
"hash": "f68c75df4413a658e2644892d2437a91"
26739+
"hash": "a99e9a4f6b5435a6b58724034a4a2388"
2674026740
},
2674126741
{
2674226742
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Teams.php",
@@ -26796,7 +26796,7 @@
2679626796
},
2679726797
{
2679826798
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/DependencyGraph.php",
26799-
"hash": "d8a9edd547aaed7e01f557f0e4d77687"
26799+
"hash": "e7d96c4a23ed8784eb3e47de15dffff3"
2680026800
},
2680126801
{
2680226802
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php",
@@ -27220,7 +27220,7 @@
2722027220
},
2722127221
{
2722227222
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Three.php",
27223-
"hash": "dd3e03cc2bc5917a695d1bbf0dc65ec1"
27223+
"hash": "1c3402598477978c2f259e7d66016c4b"
2722427224
},
2722527225
{
2722627226
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php",
@@ -27232,15 +27232,15 @@
2723227232
},
2723327233
{
2723427234
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php",
27235-
"hash": "488418233581df4e8dc3dbce8f58b2db"
27235+
"hash": "d1905900da5b62fabb0b324a38bb7279"
2723627236
},
2723727237
{
2723827238
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
2723927239
"hash": "b07c3129c02039907ccb3a8d3d76e9cc"
2724027240
},
2724127241
{
2724227242
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
27243-
"hash": "54f2eaa834e5094fb1fe0e311778f0db"
27243+
"hash": "6342d64a0234d600d44967c08c421b75"
2724427244
},
2724527245
{
2724627246
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php",
@@ -27440,11 +27440,11 @@
2744027440
},
2744127441
{
2744227442
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27443-
"hash": "debf7455f39c014547f7a32fb618377b"
27443+
"hash": "eb9acf050e7c53fe1a316472b8cdc81d"
2744427444
},
2744527445
{
2744627446
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27447-
"hash": "89b8157fa383aa797b86b839ff61450d"
27447+
"hash": "e5864aba0dd4de9cada7ede4eeee69c5"
2744827448
},
2744927449
{
2745027450
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27456,7 +27456,7 @@
2745627456
},
2745727457
{
2745827458
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Meta.php",
27459-
"hash": "36de6758976b0a2ceb21d6074889a987"
27459+
"hash": "efb7434a503625c23355172c4638e6bb"
2746027460
},
2746127461
{
2746227462
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
@@ -27572,7 +27572,7 @@
2757227572
},
2757327573
{
2757427574
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/DependencyGraph.php",
27575-
"hash": "1a842b54f0e563f4c8b82d145032d428"
27575+
"hash": "a69f445c74c4b7b7c28abe4e750cc769"
2757627576
},
2757727577
{
2757827578
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Git.php",
@@ -27584,7 +27584,7 @@
2758427584
},
2758527585
{
2758627586
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Search.php",
27587-
"hash": "b3d46ba9c8468fc11c3405b1cf6997d6"
27587+
"hash": "6e92f41ff9de1bd3067e80b3f3da380d"
2758827588
},
2758927589
{
2759027590
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Users.php",
@@ -29980,7 +29980,7 @@
2998029980
},
2998129981
{
2998229982
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/ExemptionRequestSecretScanning.php",
29983-
"hash": "e550ea2c9347d62bf5d9aff708db7f84"
29983+
"hash": "3ea362e61c4909da5cee41829c18ff3b"
2998429984
},
2998529985
{
2998629986
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CacheSync.php",
@@ -30168,7 +30168,7 @@
3016830168
},
3016930169
{
3017030170
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Release.php",
30171-
"hash": "21dde5763785e1eae57bafacbb54500f"
30171+
"hash": "c1a80456f961d05acbaf110dab081f2c"
3017230172
},
3017330173
{
3017430174
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Repository.php",
@@ -30244,7 +30244,7 @@
3024430244
},
3024530245
{
3024630246
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
30247-
"hash": "33ceca1f3ae6f0c1fe210856d4009c8c"
30247+
"hash": "cfbd5a95a457181202af0ded967fedcf"
3024830248
},
3024930249
{
3025030250
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ActionsInbound.php",
@@ -30281,6 +30281,22 @@
3028130281
{
3028230282
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/Operations\/Meta\/GetZen\/Response\/TextPlain\/Ok.php",
3028330283
"hash": "d0ca0c14c2d902d47122181008e84185"
30284+
},
30285+
{
30286+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure.php",
30287+
"hash": "402d90be4e3731ec2090b344dd7be2cb"
30288+
},
30289+
{
30290+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosureMetadata.php",
30291+
"hash": "481b587324bb974972dd0edc53d33df7"
30292+
},
30293+
{
30294+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure\/Data.php",
30295+
"hash": "7e31b58800848793f0d914de6f592979"
30296+
},
30297+
{
30298+
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php",
30299+
"hash": "918a75e1fc3897bd242cdd1f3516cd1a"
3028430300
}
3028530301
]
3028630302
},

clients/GitHubEnterprise-3.14/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/ExemptionRequestData.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed
3838
} catch (Throwable) {
3939
}
4040
}
41+
42+
if ($signature === 'data|type' && $value['type'] === 'secret_scanning_closure') {
43+
try {
44+
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosure::class, $value);
45+
} catch (Throwable) {
46+
}
47+
}
4148
}
4249

4350
return $value;

clients/GitHubEnterprise-3.14/src/Internal/Attribute/CastUnionToType/Schema/ExemptionRequest/Metadata.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 === 'alert_title|reason' && ($value['reason'] === 'fixed_later' || $value['reason'] === 'false_positive' || $value['reason'] === 'tests' || $value['reason'] === 'revoked')) {
36+
try {
37+
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosureMetadata::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
3441
}
3542

3643
return $value;

clients/GitHubEnterprise-3.14/src/Internal/Hydrator/WebHook/ExemptionRequestSecretScanning.php

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use ApiClients\Client\GitHubEnterprise\Internal\Attribute\CastUnionToType\Schema\ExemptionRequest\Metadata;
99
use ApiClients\Client\GitHubEnterprise\Schema\EnterpriseWebhooks;
1010
use ApiClients\Client\GitHubEnterprise\Schema\ExemptionRequest;
11-
use ApiClients\Client\GitHubEnterprise\Schema\ExemptionRequestSecretScanningMetadata;
1211
use ApiClients\Client\GitHubEnterprise\Schema\ExemptionResponse;
1312
use ApiClients\Client\GitHubEnterprise\Schema\LicenseSimple;
1413
use ApiClients\Client\GitHubEnterprise\Schema\OrganizationSimpleWebhooks;
@@ -78,7 +77,6 @@ public function hydrateObject(string $className, array $payload): object
7877
'ApiClients\Client\GitHubEnterprise\Schema\ExemptionResponse' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ExemptionResponse($payload),
7978
'ApiClients\Client\GitHubEnterprise\Schema\WebhookExemptionRequestResponseSubmitted' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookExemptionRequestResponseSubmitted($payload),
8079
'ApiClients\Client\GitHubEnterprise\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload),
81-
'ApiClients\Client\GitHubEnterprise\Schema\ExemptionRequestSecretScanningMetadata' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ExemptionRequestSecretScanningMetadata($payload),
8280
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
8381
};
8482
}
@@ -3580,15 +3578,6 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
35803578
goto after_metadata;
35813579
}
35823580

3583-
if (is_array($value)) {
3584-
try {
3585-
$this->hydrationStack[] = 'metadata';
3586-
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ExemptionRequestSecretScanningMetadata($value);
3587-
} finally {
3588-
array_pop($this->hydrationStack);
3589-
}
3590-
}
3591-
35923581
$properties['metadata'] = $value;
35933582

35943583
after_metadata:
@@ -4396,47 +4385,6 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
43964385
}
43974386
}
43984387

4399-
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ExemptionRequestSecretScanningMetadata(array $payload): ExemptionRequestSecretScanningMetadata
4400-
{
4401-
$properties = [];
4402-
$missingFields = [];
4403-
try {
4404-
$value = $payload['label'] ?? null;
4405-
4406-
if ($value === null) {
4407-
$properties['label'] = null;
4408-
goto after_label;
4409-
}
4410-
4411-
$properties['label'] = $value;
4412-
4413-
after_label:
4414-
4415-
$value = $payload['reason'] ?? null;
4416-
4417-
if ($value === null) {
4418-
$properties['reason'] = null;
4419-
goto after_reason;
4420-
}
4421-
4422-
$properties['reason'] = $value;
4423-
4424-
after_reason:
4425-
} catch (Throwable $exception) {
4426-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ExemptionRequestSecretScanningMetadata', $exception, stack: $this->hydrationStack);
4427-
}
4428-
4429-
if (count($missingFields) > 0) {
4430-
throw UnableToHydrateObject::dueToMissingFields(ExemptionRequestSecretScanningMetadata::class, $missingFields, stack: $this->hydrationStack);
4431-
}
4432-
4433-
try {
4434-
return new ExemptionRequestSecretScanningMetadata(...$properties);
4435-
} catch (Throwable $exception) {
4436-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ExemptionRequestSecretScanningMetadata', $exception, stack: $this->hydrationStack);
4437-
}
4438-
}
4439-
44404388
private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array
44414389
{
44424390
foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) {
@@ -6400,7 +6348,10 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
64006348
goto after_metadata;
64016349
}
64026350

6403-
$metadata = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ExemptionRequestSecretScanningMetadata($metadata);
6351+
if (is_object($metadata)) {
6352+
$metadata = $this->serializeObject($metadata);
6353+
}
6354+
64046355
after_metadata: $result['metadata'] = $metadata;
64056356

64066357
$expiresAt = $object->expiresAt;

0 commit comments

Comments
 (0)