Skip to content

[GitHubEnterpriseCloud] Update to 1.1.4-aa6e867dcdb64b9db1fac624925d5631 from 1.1.4-1af67ef4f45d37f00bce6c1060039205 #1537

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
8 changes: 8 additions & 0 deletions clients/GitHubEnterpriseCloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6645,6 +6645,7 @@ $client->call('GET /orgs/{org}/attestations/{subject_digest}', [
'after' => 'generated',
'org' => 'generated',
'subject_digest' => 'generated',
'predicate_type' => 'generated',
'per_page' => 8,
]);
```
Expand All @@ -6655,6 +6656,7 @@ $client->operations()->orgs()->listAttestations( before: 'generated',
after: 'generated',
org: 'generated',
subject_digest: 'generated',
predicate_type: 'generated',
per_page: 8,
);
```
Expand Down Expand Up @@ -16379,6 +16381,7 @@ $client->call('GET /repos/{owner}/{repo}/attestations/{subject_digest}', [
'before' => 'generated',
'after' => 'generated',
'subject_digest' => 'generated',
'predicate_type' => 'generated',
'per_page' => 8,
]);
```
Expand All @@ -16390,6 +16393,7 @@ $client->operations()->repos()->listAttestations( owner: 'generated',
before: 'generated',
after: 'generated',
subject_digest: 'generated',
predicate_type: 'generated',
per_page: 8,
);
```
Expand Down Expand Up @@ -28310,6 +28314,7 @@ Using the `call` method:
$client->call('GET /search/issues', [
'q' => 'generated',
'sort' => 'generated',
'advanced_search' => 'generated',
'order' => 'generated',
'per_page' => 8,
'page' => 1,
Expand All @@ -28320,6 +28325,7 @@ Operations method:
```php
$client->operations()->search()->issuesAndPullRequests( q: 'generated',
sort: 'generated',
advanced_search: 'generated',
order: 'generated',
per_page: 8,
page: 1,
Expand Down Expand Up @@ -32071,6 +32077,7 @@ $client->call('GET /users/{username}/attestations/{subject_digest}', [
'after' => 'generated',
'username' => 'generated',
'subject_digest' => 'generated',
'predicate_type' => 'generated',
'per_page' => 8,
]);
```
Expand All @@ -32081,6 +32088,7 @@ $client->operations()->users()->listAttestations( before: 'generated',
after: 'generated',
username: 'generated',
subject_digest: 'generated',
predicate_type: 'generated',
per_page: 8,
);
```
Expand Down
228 changes: 102 additions & 126 deletions clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/GitHubEnterpriseCloud/src/Client.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/GitHubEnterpriseCloud/src/ClientInterface.php

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Hydrator\Operation\Users\Username\Attestations;

use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok;
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json;
use EventSauce\ObjectHydrator\IterableList;
use EventSauce\ObjectHydrator\ObjectMapper;
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
Expand Down Expand Up @@ -39,13 +39,13 @@ public function __construct()
public function hydrateObject(string $className, array $payload): object
{
return match ($className) {
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($payload),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload),
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
};
}

private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok(array $payload): Ok
private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(array $payload): Json
{
$properties = [];
$missingFields = [];
Expand All @@ -61,17 +61,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S

after_attestations:
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack);
}

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

try {
return new Ok(...$properties);
return new Json(...$properties);
} catch (Throwable $exception) {
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok', $exception, stack: $this->hydrationStack);
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json', $exception, stack: $this->hydrationStack);
}
}

Expand Down Expand Up @@ -169,7 +169,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'DateTime' => $this->serializeValueDateTime($object),
'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object),
'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json($object),
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object),
default => throw new LogicException("No serialization defined for $className"),
};
Expand Down Expand Up @@ -233,9 +233,9 @@ private function serializeValueDateTimeInterface(mixed $value): mixed
return $serializer->serialize($value, $this);
}

private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok(mixed $object): mixed
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok⚡️Application⚡️Json(mixed $object): mixed
{
assert($object instanceof Ok);
assert($object instanceof Json);
$result = [];

$attestations = $object->attestations;
Expand Down
4 changes: 2 additions & 2 deletions clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ public function hydrateObject(string $className, array $payload): object
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Apps\\ListInstallationReposForAuthenticatedUser\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀User🌀Installations🌀InstallationId🌀Repositories()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Key' => $this->getObjectMapperOperation🌀User🌀Keys()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SshSigningKey' => $this->getObjectMapperOperation🌀User🌀SshSigningKeys()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Hovercard' => $this->getObjectMapperOperation🌀Users🌀Username🌀Hovercard()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionConfigurationDisabled', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\EnterpriseWebhooks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SimpleInstallation', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\OrganizationSimpleWebhooks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\Permissions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\CustomProperties', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\TemplateRepository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\TemplateRepository\\Owner', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\TemplateRepository\\Permissions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionConfigurationEnabled' => $this->getObjectMapperWebHook🪝BranchProtectionConfiguration()->hydrateObject($className, $payload),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksRule', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleDeleted', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AdminEnforced', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorNames', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorsOnly', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedDismissalActorsOnly', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LinearHistoryRequirementEnforcementLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockBranchEnforcementLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockAllowsForkSync', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\PullRequestReviewsEnforcementLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequireLastPushApproval', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecksEnforcementLevel' => $this->getObjectMapperWebHook🪝BranchProtectionRule()->hydrateObject($className, $payload),
Expand Down Expand Up @@ -1585,7 +1585,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Apps\\ListInstallationReposForAuthenticatedUser\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀User🌀Installations🌀InstallationId🌀Repositories()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Key' => $this->getObjectMapperOperation🌀User🌀Keys()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SshSigningKey' => $this->getObjectMapperOperation🌀User🌀SshSigningKeys()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Hovercard' => $this->getObjectMapperOperation🌀Users🌀Username🌀Hovercard()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionConfigurationDisabled', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\EnterpriseWebhooks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SimpleInstallation', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\OrganizationSimpleWebhooks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\Permissions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\CustomProperties', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\TemplateRepository', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\TemplateRepository\\Owner', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\RepositoryWebhooks\\TemplateRepository\\Permissions', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionConfigurationEnabled' => $this->getObjectMapperWebHook🪝BranchProtectionConfiguration()->serializeObject($object),
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleCreated', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhooksRule', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleDeleted', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AdminEnforced', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorNames', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedActorsOnly', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\AuthorizedDismissalActorsOnly', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LinearHistoryRequirementEnforcementLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockBranchEnforcementLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\LockAllowsForkSync', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\PullRequestReviewsEnforcementLevel', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequireLastPushApproval', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecks', '\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\WebhookBranchProtectionRuleEdited\\Changes\\RequiredStatusChecksEnforcementLevel' => $this->getObjectMapperWebHook🪝BranchProtectionRule()->serializeObject($object),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function createResponse(ResponseInterface $response): Observable

throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body));
/**
* Response if GitHub Advanced Security is not enabled for this repository
* Response for a private repository when GitHub Advanced Security is not enabled, or if used against a fork
**/

case 403:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use RuntimeException;

use function explode;
use function json_decode;
use function str_replace;

final class GetZen
Expand All @@ -34,8 +33,8 @@ public function createResponse(ResponseInterface $response): string
$code = $response->getStatusCode();
[$contentType] = explode(';', $response->getHeaderLine('Content-Type'));
switch ($contentType) {
case 'application/json':
$body = json_decode($response->getBody()->getContents(), true);
case 'text/plain':
$body = $response->getBody()->getContents();
switch ($code) {
case 200:
return $body;
Expand Down
Loading
Loading