Skip to content

Commit 3f9679c

Browse files
WyriHaximusgithub-actions[bot]
authored andcommitted
[GitHubEnterprise-3.9] Update to 1.1.4-c2aa4f5795e9bf6be125020d39e6f7d7 from 1.1.4-42a2a604c0aaa815c28890c5dd246167
Detected Schema changes: starting work. Building original model for commit 9bef3e SPEC: extracted 2 commits from history ├─┬Paths │ ├─┬/repos/{owner}/{repo}/git/ref/{ref} │ │ └─┬GET │ │ └─┬Parameters │ │ ├──[-] example (223151:16) │ │ └──[M] description (223084:20) │ ├─┬/repos/{owner}/{repo}/git/refs/{ref} │ │ ├─┬DELETE │ │ │ ├──[-] description (27310:20) │ │ │ └─┬Parameters │ │ │ ├──[-] example (223151:16) │ │ │ └──[M] description (223084:20) │ │ └─┬PATCH │ │ ├──[-] description (27255:20) │ │ └─┬Parameters │ │ ├──[M] example (27272:18) │ │ └──[M] description (27266:22) │ └─┬/repos/{owner}/{repo}/git/matching-refs/{ref} │ └─┬GET │ └─┬Parameters │ ├──[-] example (223151:16) │ └──[M] description (223084:20) └─┬Components ├──[-] parameters (223146:7)❌ └─┬webhook-member-added └─┬changes ├──[-] properties (121340:13)❌ └─┬permission └──[-] description (121325:28) Date: 03/07/24 | Commit: New: etc/specs/GitHubEnterprise-3.9/previous.spec.yaml, Original: etc/specs/GitHubEnterprise-3.9/current.spec.yaml Document Element | Total Changes | Breaking Changes paths | 10 | 0 components | 3 | 2 ❌ 2 Breaking changes out of 13 INFO: Modifications: 5 INFO: Removals: 8 INFO: Breaking Removals: 2
1 parent e93b467 commit 3f9679c

Some content is hidden

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

46 files changed

+305
-117
lines changed

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

Lines changed: 48 additions & 44 deletions
Large diffs are not rendered by default.

clients/GitHubEnterprise-3.9/src/Internal/Hydrator/WebHook/Member.php

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded;
1818
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes;
1919
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\Permission;
20+
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName;
2021
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberEdited;
2122
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberEdited\Changes\OldPermission;
2223
use ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberRemoved;
@@ -58,6 +59,7 @@ public function hydrateObject(string $className, array $payload): object
5859
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded($payload),
5960
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes($payload),
6061
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\Permission' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️Permission($payload),
62+
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($payload),
6163
'ApiClients\Client\GitHubEnterprise\Schema\EnterpriseWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks($payload),
6264
'ApiClients\Client\GitHubEnterprise\Schema\SimpleInstallation' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleInstallation($payload),
6365
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Member' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Member($payload),
@@ -275,6 +277,26 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
275277
$properties['permission'] = $value;
276278

277279
after_permission:
280+
281+
$value = $payload['role_name'] ?? null;
282+
283+
if ($value === null) {
284+
$properties['roleName'] = null;
285+
goto after_roleName;
286+
}
287+
288+
if (is_array($value)) {
289+
try {
290+
$this->hydrationStack[] = 'roleName';
291+
$value = $this->hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($value);
292+
} finally {
293+
array_pop($this->hydrationStack);
294+
}
295+
}
296+
297+
$properties['roleName'] = $value;
298+
299+
after_roleName:
278300
} catch (Throwable $exception) {
279301
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes', $exception, stack: $this->hydrationStack);
280302
}
@@ -320,6 +342,36 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
320342
}
321343
}
322344

345+
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName(array $payload): RoleName
346+
{
347+
$properties = [];
348+
$missingFields = [];
349+
try {
350+
$value = $payload['to'] ?? null;
351+
352+
if ($value === null) {
353+
$missingFields[] = 'to';
354+
goto after_to;
355+
}
356+
357+
$properties['to'] = $value;
358+
359+
after_to:
360+
} catch (Throwable $exception) {
361+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName', $exception, stack: $this->hydrationStack);
362+
}
363+
364+
if (count($missingFields) > 0) {
365+
throw UnableToHydrateObject::dueToMissingFields(RoleName::class, $missingFields, stack: $this->hydrationStack);
366+
}
367+
368+
try {
369+
return new RoleName(...$properties);
370+
} catch (Throwable $exception) {
371+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName', $exception, stack: $this->hydrationStack);
372+
}
373+
}
374+
323375
private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks(array $payload): EnterpriseWebhooks
324376
{
325377
$properties = [];
@@ -4972,6 +5024,7 @@ public function serializeObjectOfType(object $object, string $className): mixed
49725024
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded($object),
49735025
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes($object),
49745026
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\Permission' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️Permission($object),
5027+
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Changes\RoleName' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($object),
49755028
'ApiClients\Client\GitHubEnterprise\Schema\EnterpriseWebhooks' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks($object),
49765029
'ApiClients\Client\GitHubEnterprise\Schema\SimpleInstallation' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️SimpleInstallation($object),
49775030
'ApiClients\Client\GitHubEnterprise\Schema\WebhookMemberAdded\Member' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Member($object),
@@ -5131,6 +5184,15 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
51315184
$permission = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️Permission($permission);
51325185
after_permission: $result['permission'] = $permission;
51335186

5187+
$roleName = $object->roleName;
5188+
5189+
if ($roleName === null) {
5190+
goto after_roleName;
5191+
}
5192+
5193+
$roleName = $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName($roleName);
5194+
after_roleName: $result['role_name'] = $roleName;
5195+
51345196
return $result;
51355197
}
51365198

@@ -5145,6 +5207,17 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
51455207
return $result;
51465208
}
51475209

5210+
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️WebhookMemberAdded⚡️Changes⚡️RoleName(mixed $object): mixed
5211+
{
5212+
assert($object instanceof RoleName);
5213+
$result = [];
5214+
5215+
$to = $object->to;
5216+
after_to: $result['to'] = $to;
5217+
5218+
return $result;
5219+
}
5220+
51485221
private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema⚡️EnterpriseWebhooks(mixed $object): mixed
51495222
{
51505223
assert($object instanceof EnterpriseWebhooks);

clients/GitHubEnterprise-3.9/src/Internal/Hydrators.php

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

clients/GitHubEnterprise-3.9/src/Internal/Operation/Git/DeleteRef.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class DeleteRef
2727
private string $owner;
2828
/**The name of the repository without the `.git` extension. The name is not case sensitive. **/
2929
private string $repo;
30-
/**The commit reference. Can be a commit SHA, branch name (`heads/BRANCH_NAME`), or tag name (`tags/TAG_NAME`). For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
30+
/**The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
3131
private string $ref;
3232

3333
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Git\Refs\Ref $hydrator, string $owner, string $repo, string $ref)

clients/GitHubEnterprise-3.9/src/Internal/Operation/Git/GetRef.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class GetRef
2626
private string $owner;
2727
/**The name of the repository without the `.git` extension. The name is not case sensitive. **/
2828
private string $repo;
29-
/**The commit reference. Can be a commit SHA, branch name (`heads/BRANCH_NAME`), or tag name (`tags/TAG_NAME`). For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
29+
/**The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
3030
private string $ref;
3131

3232
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Git\Ref\Ref $hydrator, string $owner, string $repo, string $ref)

clients/GitHubEnterprise-3.9/src/Internal/Operation/Git/ListMatchingRefs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ final class ListMatchingRefs
2828
private string $owner;
2929
/**The name of the repository without the `.git` extension. The name is not case sensitive. **/
3030
private string $repo;
31-
/**The commit reference. Can be a commit SHA, branch name (`heads/BRANCH_NAME`), or tag name (`tags/TAG_NAME`). For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
31+
/**The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
3232
private string $ref;
3333

3434
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Git\MatchingRefs\Ref $hydrator, string $owner, string $repo, string $ref)

clients/GitHubEnterprise-3.9/src/Internal/Operation/Git/UpdateRef.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class UpdateRef
2727
private string $owner;
2828
/**The name of the repository without the `.git` extension. The name is not case sensitive. **/
2929
private string $repo;
30-
/**The name of the reference to update (for example, `heads/featureA`). Can be a branch name (`heads/BRANCH_NAME`) or tag name (`tags/TAG_NAME`). For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
30+
/**The Git reference. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. **/
3131
private string $ref;
3232

3333
public function __construct(private readonly SchemaValidator $requestSchemaValidator, private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Git\Refs\Ref $hydrator, string $owner, string $repo, string $ref)

clients/GitHubEnterprise-3.9/src/Internal/Operator/Actions/CreateEnvironmentVariable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
2424
{
2525
}
2626

27+
/** @return */
2728
public function call(string $owner, string $repo, string $environmentName, array $params): EmptyObject
2829
{
2930
$operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\Actions\CreateEnvironmentVariable($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo, $environmentName);

clients/GitHubEnterprise-3.9/src/Internal/Operator/Actions/CreateOrUpdateEnvironmentSecret.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
2525
{
2626
}
2727

28+
/** @return */
2829
public function call(string $owner, string $repo, string $environmentName, string $secretName, array $params): EmptyObject|WithoutBody
2930
{
3031
$operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\Actions\CreateOrUpdateEnvironmentSecret($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo, $environmentName, $secretName);

clients/GitHubEnterprise-3.9/src/Internal/Operator/Actions/DeleteEnvironmentSecret.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
2222
{
2323
}
2424

25+
/** @return */
2526
public function call(string $owner, string $repo, string $environmentName, string $secretName): WithoutBody
2627
{
2728
$operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\Actions\DeleteEnvironmentSecret($owner, $repo, $environmentName, $secretName);

0 commit comments

Comments
 (0)