Skip to content

Commit 51a3666

Browse files
authored
Merge pull request #1544 from php-api-clients/GitHubEnterprise-3.15/from-1.1.4-dafc4bb4ca8269335f6c4492394f88df-from-1.1.4-dafc4bb4ca8269335f6c4492394f88df
2 parents fbb9730 + 83fb8ec commit 51a3666

33 files changed

+780
-117
lines changed

clients/GitHubEnterprise-3.15/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": "a52c4c09b475fc1c0194c7e656ee966d",
2+
"specHash": "dafc4bb4ca8269335f6c4492394f88df",
33
"generatedFiles": {
44
"files": [
55
{
@@ -7896,7 +7896,7 @@
78967896
},
78977897
{
78987898
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/DependencyGraph\/DiffRange.php",
7899-
"hash": "9bf7067713932c3221d92f2191b26a14"
7899+
"hash": "075b6038151ce73c38ee1b662312e485"
79007900
},
79017901
{
79027902
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/DependencyGraph\/DiffRangeTest.php",
@@ -11224,7 +11224,7 @@
1122411224
},
1122511225
{
1122611226
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/Search\/IssuesAndPullRequests.php",
11227-
"hash": "7e529f8c1df4812ca8b2791054142b14"
11227+
"hash": "271c14cfe4f6b4e11e2808f7726ba9c2"
1122811228
},
1122911229
{
1123011230
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/Search\/IssuesAndPullRequestsTest.php",
@@ -13328,7 +13328,7 @@
1332813328
},
1332913329
{
1333013330
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Operator\/Meta\/GetZen.php",
13331-
"hash": "6e8ac5284c1f5b9ab767845a753174bb"
13331+
"hash": "d9d04364b4b5d6c1dd1936d1c8c4e727"
1333213332
},
1333313333
{
1333413334
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Internal\/Operation\/Meta\/GetZenTest.php",
@@ -15412,15 +15412,15 @@
1541215412
},
1541315413
{
1541415414
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php",
15415-
"hash": "53f53943e63e4cf9eb63a983ce3155ac"
15415+
"hash": "1fc2f779d08ed5752c34175a6d602409"
1541615416
},
1541715417
{
1541815418
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php",
15419-
"hash": "e8b5241ea2c5d1fe3e0dfbd49fc47891"
15419+
"hash": "838b43367eb6df1a6caf3240812fc8e5"
1542015420
},
1542115421
{
1542215422
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php",
15423-
"hash": "e1855e2c3bbb1d3d4a53733457d99513"
15423+
"hash": "5658982cf775d944e65e8d66e337f54f"
1542415424
},
1542515425
{
1542615426
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/SimpleCheckSuite.php",
@@ -16352,23 +16352,23 @@
1635216352
},
1635316353
{
1635416354
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCancelled.php",
16355-
"hash": "07109747e05b5f89f30c8587bc3afb38"
16355+
"hash": "a5d270af8f199e394545787b17031809"
1635616356
},
1635716357
{
1635816358
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCompleted.php",
16359-
"hash": "f5393250e5841142c167da40396ad27d"
16359+
"hash": "7e6b984ee9b3db5f5947b78f88320dc3"
1636016360
},
1636116361
{
1636216362
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestCreated.php",
16363-
"hash": "76ccc1ea0b02868a13d71cd85cffd5da"
16363+
"hash": "ee70bfc5bf34bcfd0b5896b52303a0e9"
1636416364
},
1636516365
{
1636616366
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseDismissed.php",
16367-
"hash": "23cd8a44e2ec2127333afdb24a81c43f"
16367+
"hash": "8066599162870eca90dd7350767037da"
1636816368
},
1636916369
{
1637016370
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookExemptionRequestResponseSubmitted.php",
16371-
"hash": "b996946f06d054adf2a07c71e9b207e3"
16371+
"hash": "cb0534a40782bde7522118e3a44aa1c9"
1637216372
},
1637316373
{
1637416374
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookCacheSync.php",
@@ -17072,7 +17072,7 @@
1707217072
},
1707317073
{
1707417074
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited.php",
17075-
"hash": "337f0fa98d6747014915ce8f2993ce3b"
17075+
"hash": "f33afafcc173bf266ee2a3ee20b288a0"
1707617076
},
1707717077
{
1707817078
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleasePrereleased.php",
@@ -24172,7 +24172,7 @@
2417224172
},
2417324173
{
2417424174
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes.php",
24175-
"hash": "e186f35fa3eb635d2abe20d9e4cab01d"
24175+
"hash": "77c6c61ecf25f37254d59dd5b1d01406"
2417624176
},
2417724177
{
2417824178
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/MakeLatest.php",
@@ -26652,7 +26652,7 @@
2665226652
},
2665326653
{
2665426654
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Meta.php",
26655-
"hash": "79885a9c2e3f9d127ab68bfef21f8105"
26655+
"hash": "4bfec77db1fdd948564bf8bbf8b4eb90"
2665626656
},
2665726657
{
2665826658
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/EnterpriseAdmin.php",
@@ -26696,7 +26696,7 @@
2669626696
},
2669726697
{
2669826698
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Search.php",
26699-
"hash": "f68c75df4413a658e2644892d2437a91"
26699+
"hash": "a99e9a4f6b5435a6b58724034a4a2388"
2670026700
},
2670126701
{
2670226702
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Teams.php",
@@ -26760,7 +26760,7 @@
2676026760
},
2676126761
{
2676226762
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/DependencyGraph.php",
26763-
"hash": "d8a9edd547aaed7e01f557f0e4d77687"
26763+
"hash": "e7d96c4a23ed8784eb3e47de15dffff3"
2676426764
},
2676526765
{
2676626766
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php",
@@ -27200,7 +27200,7 @@
2720027200
},
2720127201
{
2720227202
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Three.php",
27203-
"hash": "dd3e03cc2bc5917a695d1bbf0dc65ec1"
27203+
"hash": "1c3402598477978c2f259e7d66016c4b"
2720427204
},
2720527205
{
2720627206
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php",
@@ -27212,15 +27212,15 @@
2721227212
},
2721327213
{
2721427214
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php",
27215-
"hash": "488418233581df4e8dc3dbce8f58b2db"
27215+
"hash": "d1905900da5b62fabb0b324a38bb7279"
2721627216
},
2721727217
{
2721827218
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
2721927219
"hash": "f44dd133d5a777f374149df2b549e928"
2722027220
},
2722127221
{
2722227222
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
27223-
"hash": "d1150fbd014d36156e93d57968197bcc"
27223+
"hash": "a7d01ee040f75b9e0b3a294fd442f0e6"
2722427224
},
2722527225
{
2722627226
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php",
@@ -27420,11 +27420,11 @@
2742027420
},
2742127421
{
2742227422
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27423-
"hash": "3ded2a6fde523cb12555f37cb931bf20"
27423+
"hash": "057a0e66c0fac8be025f4333a6d16a9b"
2742427424
},
2742527425
{
2742627426
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27427-
"hash": "0818c1281e383d8c8d1fa7f3e312e368"
27427+
"hash": "0afba759e55aef88b3e3a19ce1993b10"
2742827428
},
2742927429
{
2743027430
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
@@ -27436,7 +27436,7 @@
2743627436
},
2743727437
{
2743827438
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Meta.php",
27439-
"hash": "36de6758976b0a2ceb21d6074889a987"
27439+
"hash": "efb7434a503625c23355172c4638e6bb"
2744027440
},
2744127441
{
2744227442
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
@@ -27556,7 +27556,7 @@
2755627556
},
2755727557
{
2755827558
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/DependencyGraph.php",
27559-
"hash": "1a842b54f0e563f4c8b82d145032d428"
27559+
"hash": "a69f445c74c4b7b7c28abe4e750cc769"
2756027560
},
2756127561
{
2756227562
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Git.php",
@@ -27568,7 +27568,7 @@
2756827568
},
2756927569
{
2757027570
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Search.php",
27571-
"hash": "b3d46ba9c8468fc11c3405b1cf6997d6"
27571+
"hash": "6e92f41ff9de1bd3067e80b3f3da380d"
2757227572
},
2757327573
{
2757427574
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/Users.php",
@@ -29988,7 +29988,7 @@
2998829988
},
2998929989
{
2999029990
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/ExemptionRequestSecretScanning.php",
29991-
"hash": "e550ea2c9347d62bf5d9aff708db7f84"
29991+
"hash": "3ea362e61c4909da5cee41829c18ff3b"
2999229992
},
2999329993
{
2999429994
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CacheSync.php",
@@ -30176,7 +30176,7 @@
3017630176
},
3017730177
{
3017830178
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Release.php",
30179-
"hash": "21dde5763785e1eae57bafacbb54500f"
30179+
"hash": "c1a80456f961d05acbaf110dab081f2c"
3018030180
},
3018130181
{
3018230182
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Repository.php",
@@ -30252,7 +30252,7 @@
3025230252
},
3025330253
{
3025430254
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
30255-
"hash": "bfa947e43129bb77e6b2597ed7c846b5"
30255+
"hash": "b2741a7e6be9c717fb0810d87338b076"
3025630256
},
3025730257
{
3025830258
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ApiOverview\/Domains\/ActionsInbound.php",
@@ -30289,6 +30289,22 @@
3028930289
{
3029030290
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/Operations\/Meta\/GetZen\/Response\/TextPlain\/Ok.php",
3029130291
"hash": "d0ca0c14c2d902d47122181008e84185"
30292+
},
30293+
{
30294+
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure.php",
30295+
"hash": "402d90be4e3731ec2090b344dd7be2cb"
30296+
},
30297+
{
30298+
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosureMetadata.php",
30299+
"hash": "481b587324bb974972dd0edc53d33df7"
30300+
},
30301+
{
30302+
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure\/Data.php",
30303+
"hash": "7e31b58800848793f0d914de6f592979"
30304+
},
30305+
{
30306+
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php",
30307+
"hash": "918a75e1fc3897bd242cdd1f3516cd1a"
3029230308
}
3029330309
]
3029430310
},

clients/GitHubEnterprise-3.15/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.15/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.15/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)