Skip to content

Commit af4bbd2

Browse files
authored
Merge pull request #1537 from php-api-clients/GitHubEnterpriseCloud/from-1.1.4-aa6e867dcdb64b9db1fac624925d5631-from-1.1.4-aa6e867dcdb64b9db1fac624925d5631
2 parents 6c1f9f1 + 7227433 commit af4bbd2

File tree

97 files changed

+527
-1609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+527
-1609
lines changed

clients/GitHubEnterpriseCloud/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6645,6 +6645,7 @@ $client->call('GET /orgs/{org}/attestations/{subject_digest}', [
66456645
'after' => 'generated',
66466646
'org' => 'generated',
66476647
'subject_digest' => 'generated',
6648+
'predicate_type' => 'generated',
66486649
'per_page' => 8,
66496650
]);
66506651
```
@@ -6655,6 +6656,7 @@ $client->operations()->orgs()->listAttestations( before: 'generated',
66556656
after: 'generated',
66566657
org: 'generated',
66576658
subject_digest: 'generated',
6659+
predicate_type: 'generated',
66586660
per_page: 8,
66596661
);
66606662
```
@@ -16379,6 +16381,7 @@ $client->call('GET /repos/{owner}/{repo}/attestations/{subject_digest}', [
1637916381
'before' => 'generated',
1638016382
'after' => 'generated',
1638116383
'subject_digest' => 'generated',
16384+
'predicate_type' => 'generated',
1638216385
'per_page' => 8,
1638316386
]);
1638416387
```
@@ -16390,6 +16393,7 @@ $client->operations()->repos()->listAttestations( owner: 'generated',
1639016393
before: 'generated',
1639116394
after: 'generated',
1639216395
subject_digest: 'generated',
16396+
predicate_type: 'generated',
1639316397
per_page: 8,
1639416398
);
1639516399
```
@@ -28310,6 +28314,7 @@ Using the `call` method:
2831028314
$client->call('GET /search/issues', [
2831128315
'q' => 'generated',
2831228316
'sort' => 'generated',
28317+
'advanced_search' => 'generated',
2831328318
'order' => 'generated',
2831428319
'per_page' => 8,
2831528320
'page' => 1,
@@ -28320,6 +28325,7 @@ Operations method:
2832028325
```php
2832128326
$client->operations()->search()->issuesAndPullRequests( q: 'generated',
2832228327
sort: 'generated',
28328+
advanced_search: 'generated',
2832328329
order: 'generated',
2832428330
per_page: 8,
2832528331
page: 1,
@@ -32071,6 +32077,7 @@ $client->call('GET /users/{username}/attestations/{subject_digest}', [
3207132077
'after' => 'generated',
3207232078
'username' => 'generated',
3207332079
'subject_digest' => 'generated',
32080+
'predicate_type' => 'generated',
3207432081
'per_page' => 8,
3207532082
]);
3207632083
```
@@ -32081,6 +32088,7 @@ $client->operations()->users()->listAttestations( before: 'generated',
3208132088
after: 'generated',
3208232089
username: 'generated',
3208332090
subject_digest: 'generated',
32091+
predicate_type: 'generated',
3208432092
per_page: 8,
3208532093
);
3208632094
```

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

Lines changed: 102 additions & 126 deletions
Large diffs are not rendered by default.

clients/GitHubEnterpriseCloud/src/Client.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

clients/GitHubEnterpriseCloud/src/ClientInterface.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Users/Username/Attestations/SubjectDigest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Hydrator\Operation\Users\Username\Attestations;
66

77
use ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError;
8-
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok;
8+
use ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json;
99
use EventSauce\ObjectHydrator\IterableList;
1010
use EventSauce\ObjectHydrator\ObjectMapper;
1111
use EventSauce\ObjectHydrator\PropertySerializers\SerializeArrayItems;
@@ -39,13 +39,13 @@ public function __construct()
3939
public function hydrateObject(string $className, array $payload): object
4040
{
4141
return match ($className) {
42-
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok($payload),
42+
'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),
4343
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload),
4444
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
4545
};
4646
}
4747

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

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

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

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

@@ -169,7 +169,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
169169
'DateTime' => $this->serializeValueDateTime($object),
170170
'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object),
171171
'DateTimeInterface' => $this->serializeValueDateTimeInterface($object),
172-
'ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️Operations⚡️Users⚡️ListAttestations⚡️Response⚡️ApplicationJson⚡️Ok($object),
172+
'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),
173173
'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object),
174174
default => throw new LogicException("No serialization defined for $className"),
175175
};
@@ -233,9 +233,9 @@ private function serializeValueDateTimeInterface(mixed $value): mixed
233233
return $serializer->serialize($value, $this);
234234
}
235235

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

241241
$attestations = $object->attestations;

clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,7 @@ public function hydrateObject(string $className, array $payload): object
11741174
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Apps\\ListInstallationReposForAuthenticatedUser\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀User🌀Installations🌀InstallationId🌀Repositories()->hydrateObject($className, $payload),
11751175
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Key' => $this->getObjectMapperOperation🌀User🌀Keys()->hydrateObject($className, $payload),
11761176
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SshSigningKey' => $this->getObjectMapperOperation🌀User🌀SshSigningKeys()->hydrateObject($className, $payload),
1177-
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload),
1177+
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->hydrateObject($className, $payload),
11781178
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Hovercard' => $this->getObjectMapperOperation🌀Users🌀Username🌀Hovercard()->hydrateObject($className, $payload),
11791179
'\\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),
11801180
'\\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),
@@ -1585,7 +1585,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
15851585
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Apps\\ListInstallationReposForAuthenticatedUser\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀User🌀Installations🌀InstallationId🌀Repositories()->serializeObject($object),
15861586
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Key' => $this->getObjectMapperOperation🌀User🌀Keys()->serializeObject($object),
15871587
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\SshSigningKey' => $this->getObjectMapperOperation🌀User🌀SshSigningKeys()->serializeObject($object),
1588-
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->serializeObject($object),
1588+
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json' => $this->getObjectMapperOperation🌀Users🌀Username🌀Attestations🌀SubjectDigest()->serializeObject($object),
15891589
'\\ApiClients\\Client\\GitHubEnterpriseCloud\\Schema\\Hovercard' => $this->getObjectMapperOperation🌀Users🌀Username🌀Hovercard()->serializeObject($object),
15901590
'\\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),
15911591
'\\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),

clients/GitHubEnterpriseCloud/src/Internal/Operation/DependencyGraph/DiffRange.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function createResponse(ResponseInterface $response): Observable
8282

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

8888
case 403:

clients/GitHubEnterpriseCloud/src/Internal/Operation/Meta/GetZen.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use RuntimeException;
1313

1414
use function explode;
15-
use function json_decode;
1615
use function str_replace;
1716

1817
final class GetZen
@@ -34,8 +33,8 @@ public function createResponse(ResponseInterface $response): string
3433
$code = $response->getStatusCode();
3534
[$contentType] = explode(';', $response->getHeaderLine('Content-Type'));
3635
switch ($contentType) {
37-
case 'application/json':
38-
$body = json_decode($response->getBody()->getContents(), true);
36+
case 'text/plain':
37+
$body = $response->getBody()->getContents();
3938
switch ($code) {
4039
case 200:
4140
return $body;

0 commit comments

Comments
 (0)