Skip to content

[GitHubEnterprise-3.14] Update to 1.1.4-c6bac21f127e4771c961c4af72e21fc4 from 1.1.4-d5ac2a68d76d323d5182cd11d4daf614 #1554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions clients/GitHubEnterprise-3.14/etc/openapi-client-generator.state
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"specHash": "d5ac2a68d76d323d5182cd11d4daf614",
"specHash": "c6bac21f127e4771c961c4af72e21fc4",
"generatedFiles": {
"files": [
{
Expand Down Expand Up @@ -7112,15 +7112,15 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/UpdateAlert.php",
"hash": "4414595983724d58e1cdf5c09e8f409f"
"hash": "b7b8c2aaaf47299f09adbb2b88b5daf5"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/UpdateAlert.php",
"hash": "0d58379475f7ab773df9ae4b3b7d84c5"
"hash": "fd3b96fa7070fd31d1490b2ae4861c54"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/UpdateAlertTest.php",
"hash": "5e18056057b185cf3a4348a8b97f093c"
"hash": "78119db7046be60d7d867ad3af28c6fa"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/ListAlertInstances.php",
Expand Down Expand Up @@ -15372,15 +15372,15 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/ExemptionRequestData.php",
"hash": "1fc2f779d08ed5752c34175a6d602409"
"hash": "be43c3a32b264a082842b4342eeed775"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/ExemptionRequest\/Metadata.php",
"hash": "838b43367eb6df1a6caf3240812fc8e5"
"hash": "988efed4f7c1c3059ab0f63d472321a6"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequest.php",
"hash": "5658982cf775d944e65e8d66e337f54f"
"hash": "bc1f73d90a1b2bbdf5c6f1ecdf0d6ce4"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/SimpleCheckSuite.php",
Expand Down Expand Up @@ -26072,7 +26072,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UpdateAlert\/Request\/ApplicationJson.php",
"hash": "ffbb63d8bfc655b760e73bb0a84b41b7"
"hash": "ef09173d8d817efd8e1e4e81d9f0edcc"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/CodeScanning\/UploadSarif\/Request\/ApplicationJson.php",
Expand Down Expand Up @@ -27108,7 +27108,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeScanning.php",
"hash": "f4eded73dbc98d19cc03cd2545bc0a44"
"hash": "b169946b91470cd53c5ec292b35ad780"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Issues.php",
Expand Down Expand Up @@ -27376,7 +27376,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php",
"hash": "619ee85831f1ccf3b4aa9570bc701fb6"
"hash": "e6af182f8222fb648cfc3c789507197c"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Nine.php",
Expand Down Expand Up @@ -27440,11 +27440,11 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
"hash": "eb9acf050e7c53fe1a316472b8cdc81d"
"hash": "97dd79ecd381fec3cd9fc9f457fd7a7e"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
"hash": "e5864aba0dd4de9cada7ede4eeee69c5"
"hash": "33e3e8b67ec421309a6fd76be03316dc"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
Expand All @@ -27456,7 +27456,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Meta.php",
"hash": "efb7434a503625c23355172c4638e6bb"
"hash": "41cc72ff89d01e5b48be965d9a5b63fd"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
Expand Down Expand Up @@ -27488,7 +27488,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/CodeScanning.php",
"hash": "035196723d9518e17e7f016fa71af9c8"
"hash": "254f6e3c029935a79e15b051e78e67ba"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/SecretScanning.php",
Expand Down Expand Up @@ -27572,7 +27572,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/DependencyGraph.php",
"hash": "a69f445c74c4b7b7c28abe4e750cc769"
"hash": "a638452f9411a0fc738141835c32327d"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Git.php",
Expand All @@ -27584,7 +27584,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Search.php",
"hash": "6e92f41ff9de1bd3067e80b3f3da380d"
"hash": "522fda33c8ae6024675365cb3775c1f1"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/Users.php",
Expand Down Expand Up @@ -29028,7 +29028,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber.php",
"hash": "b9452bc32629313c2650579a65f77f38"
"hash": "a926bd101b56e9d2fa2d26b4ba0ef2d2"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/CodeScanning\/Alerts\/AlertNumber\/Instances.php",
Expand Down Expand Up @@ -30283,20 +30283,24 @@
"hash": "d0ca0c14c2d902d47122181008e84185"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure.php",
"hash": "402d90be4e3731ec2090b344dd7be2cb"
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php",
"hash": "918a75e1fc3897bd242cdd1f3516cd1a"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosureMetadata.php",
"hash": "481b587324bb974972dd0edc53d33df7"
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/CodeScanningAlertCreateRequest.php",
"hash": "b1c32113d0944e1335325145d49ced03"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/ExemptionRequestSecretScanningClosure\/Data.php",
"hash": "7e31b58800848793f0d914de6f592979"
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanning.php",
"hash": "4311c37f93cd8a3fa3609969d2db5374"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/WebhookReleaseEdited\/Changes\/TagName.php",
"hash": "918a75e1fc3897bd242cdd1f3516cd1a"
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanningMetadata.php",
"hash": "4d08e7e942465ee37362f1f5a8df1060"
},
{
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/DismissalRequestSecretScanning\/Data.php",
"hash": "2a8bbc4780615e5e98d79b6596143aaf"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed

if ($signature === 'data|type' && $value['type'] === 'secret_scanning_closure') {
try {
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosure::class, $value);
return $hydrator->hydrateObject(Schema\DismissalRequestSecretScanning::class, $value);
} catch (Throwable) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed

if ($signature === 'alert_title|reason' && ($value['reason'] === 'fixed_later' || $value['reason'] === 'false_positive' || $value['reason'] === 'tests' || $value['reason'] === 'revoked')) {
try {
return $hydrator->hydrateObject(Schema\ExemptionRequestSecretScanningClosureMetadata::class, $value);
return $hydrator->hydrateObject(Schema\DismissalRequestSecretScanningMetadata::class, $value);
} catch (Throwable) {
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertRule;
use ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAnalysisTool;
use ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable;
use ApiClients\Client\GitHubEnterprise\Schema\ScimError;
use ApiClients\Client\GitHubEnterprise\Schema\SimpleUser;
use EventSauce\ObjectHydrator\IterableList;
use EventSauce\ObjectHydrator\ObjectMapper;
Expand Down Expand Up @@ -57,6 +58,7 @@ public function hydrateObject(string $className, array $payload): object
'ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertLocation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CodeScanningAlertLocation($payload),
'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($payload),
'ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($payload),
'ApiClients\Client\GitHubEnterprise\Schema\ScimError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError($payload),
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
};
}
Expand Down Expand Up @@ -1098,6 +1100,91 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
}
}

private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError(array $payload): ScimError
{
$properties = [];
$missingFields = [];
try {
$value = $payload['message'] ?? null;

if ($value === null) {
$properties['message'] = null;
goto after_message;
}

$properties['message'] = $value;

after_message:

$value = $payload['documentation_url'] ?? null;

if ($value === null) {
$properties['documentationUrl'] = null;
goto after_documentationUrl;
}

$properties['documentationUrl'] = $value;

after_documentationUrl:

$value = $payload['detail'] ?? null;

if ($value === null) {
$properties['detail'] = null;
goto after_detail;
}

$properties['detail'] = $value;

after_detail:

$value = $payload['status'] ?? null;

if ($value === null) {
$properties['status'] = null;
goto after_status;
}

$properties['status'] = $value;

after_status:

$value = $payload['scim_type'] ?? null;

if ($value === null) {
$properties['scimType'] = null;
goto after_scimType;
}

$properties['scimType'] = $value;

after_scimType:

$value = $payload['schemas'] ?? null;

if ($value === null) {
$properties['schemas'] = null;
goto after_schemas;
}

$properties['schemas'] = $value;

after_schemas:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ScimError', $exception, stack: $this->hydrationStack);
}

if (count($missingFields) > 0) {
throw UnableToHydrateObject::dueToMissingFields(ScimError::class, $missingFields, stack: $this->hydrationStack);
}

try {
return new ScimError(...$properties);
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\ScimError', $exception, stack: $this->hydrationStack);
}
}

private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array
{
foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) {
Expand Down Expand Up @@ -1138,6 +1225,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'ApiClients\Client\GitHubEnterprise\Schema\CodeScanningAlertLocation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️CodeScanningAlertLocation($object),
'ApiClients\Client\GitHubEnterprise\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️BasicError($object),
'ApiClients\Client\GitHubEnterprise\Schema\Operations\CodeScanning\ListAlertsForEnterprise\Response\ApplicationJson\ServiceUnavailable' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️Operations⚡️CodeScanning⚡️ListAlertsForEnterprise⚡️Response⚡️ApplicationJson⚡️ServiceUnavailable($object),
'ApiClients\Client\GitHubEnterprise\Schema\ScimError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError($object),
default => throw new LogicException("No serialization defined for $className"),
};
} catch (Throwable $exception) {
Expand Down Expand Up @@ -1752,6 +1840,69 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
return $result;
}

private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️ScimError(mixed $object): mixed
{
assert($object instanceof ScimError);
$result = [];

$message = $object->message;

if ($message === null) {
goto after_message;
}

after_message: $result['message'] = $message;

$documentationUrl = $object->documentationUrl;

if ($documentationUrl === null) {
goto after_documentationUrl;
}

after_documentationUrl: $result['documentation_url'] = $documentationUrl;

$detail = $object->detail;

if ($detail === null) {
goto after_detail;
}

after_detail: $result['detail'] = $detail;

$status = $object->status;

if ($status === null) {
goto after_status;
}

after_status: $result['status'] = $status;

$scimType = $object->scimType;

if ($scimType === null) {
goto after_scimType;
}

after_scimType: $result['scim_type'] = $scimType;

$schemas = $object->schemas;

if ($schemas === null) {
goto after_schemas;
}

static $schemasSerializer0;

if ($schemasSerializer0 === null) {
$schemasSerializer0 = new SerializeArrayItems(...[]);
}

$schemas = $schemasSerializer0->serialize($schemas, $this);
after_schemas: $result['schemas'] = $schemas;

return $result;
}

/**
* @param class-string<T> $className
* @param iterable<array> $payloads;
Expand Down
Loading
Loading