Skip to content

Commit 91e50ac

Browse files
authored
Merge pull request #1183 from php-api-clients/GitHub/from-1.1.4-165dc4edaf3899f8fa74f18ab70adbb6-from-1.1.4-165dc4edaf3899f8fa74f18ab70adbb6
2 parents 9b6dec8 + 5d2ec2f commit 91e50ac

File tree

8 files changed

+45
-114
lines changed

8 files changed

+45
-114
lines changed

clients/GitHub/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -21553,7 +21553,7 @@ You can find more about this operation over at the [API method documentation](ht
2155321553

2155421554
### repos/list-tag-protection
2155521555

21556-
List tag protection states for a repository
21556+
Deprecated - List tag protection states for a repository
2155721557

2155821558
Using the `call` method:
2155921559
```php
@@ -21570,12 +21570,12 @@ $client->operations()->repos()->listTagProtection( owner: 'generated',
2157021570
);
2157121571
```
2157221572

21573-
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/tags#list-tag-protection-states-for-a-repository).
21573+
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/tags#deprecated---list-tag-protection-states-for-a-repository).
2157421574

2157521575

2157621576
### repos/create-tag-protection
2157721577

21578-
Create a tag protection state for a repository
21578+
Deprecated - Create a tag protection state for a repository
2157921579

2158021580
Using the `call` method:
2158121581
```php
@@ -21592,12 +21592,12 @@ $client->operations()->repos()->createTagProtection( owner: 'generated',
2159221592
);
2159321593
```
2159421594

21595-
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/tags#create-a-tag-protection-state-for-a-repository).
21595+
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/tags#deprecated---create-a-tag-protection-state-for-a-repository).
2159621596

2159721597

2159821598
### repos/delete-tag-protection
2159921599

21600-
Delete a tag protection state for a repository
21600+
Deprecated - Delete a tag protection state for a repository
2160121601

2160221602
Using the `call` method:
2160321603
```php
@@ -21616,7 +21616,7 @@ $client->operations()->repos()->deleteTagProtection( owner: 'generated',
2161621616
);
2161721617
```
2161821618

21619-
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/tags#delete-a-tag-protection-state-for-a-repository).
21619+
You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/tags#deprecated---delete-a-tag-protection-state-for-a-repository).
2162021620

2162121621

2162221622
### repos/download-tarball-archive

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

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "7b81f53085c7eb703517cc9edd6bed5e",
2+
"specHash": "165dc4edaf3899f8fa74f18ab70adbb6",
33
"generatedFiles": {
44
"files": [
55
{
@@ -1780,7 +1780,7 @@
17801780
},
17811781
{
17821782
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookFork.php",
1783-
"hash": "219d173d08eed559835d437d5e781949"
1783+
"hash": "149c23f333a44134601e9d7075e06671"
17841784
},
17851785
{
17861786
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookGithubAppAuthorizationRevoked.php",
@@ -3488,7 +3488,7 @@
34883488
},
34893489
{
34903490
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookFork\/Forkee.php",
3491-
"hash": "e1aa0765ec72888ffd864ec2417e748a"
3491+
"hash": "005633dcb3201975a6f12481234f7c3f"
34923492
},
34933493
{
34943494
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookFork\/Forkee\/License.php",
@@ -27236,7 +27236,7 @@
2723627236
},
2723727237
{
2723827238
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php",
27239-
"hash": "99249ec5532c0e46a08937acb5501da3"
27239+
"hash": "f8a62fdffbd42820e452155cf51ca62f"
2724027240
},
2724127241
{
2724227242
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php",
@@ -27782,10 +27782,6 @@
2778227782
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet822B8B83\/Tiet93E9FF34\/Tiet64571DFE\/Tiet4D2FA622.php",
2778327783
"hash": "04a6477eb2edebc4797b68dc827857e2"
2778427784
},
27785-
{
27786-
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookFork\/Forkee\/CustomProperties.php",
27787-
"hash": "103d90f7b9368728a7cc4b2348bc9797"
27788-
},
2778927785
{
2779027786
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookIssuesOpened\/Changes\/OldRepository\/CustomProperties.php",
2779127787
"hash": "c80cb58f8a896af192bbf5644a78c021"
@@ -28236,7 +28232,7 @@
2823628232
},
2823728233
{
2823828234
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/Fork.php",
28239-
"hash": "a967f1db50c975232fad5125c8964d5c"
28235+
"hash": "926cc24d71e6c029fb051ac43336576d"
2824028236
},
2824128237
{
2824228238
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/GithubAppAuthorization.php",

clients/GitHub/src/Internal/Hydrator/WebHook/Fork.php

+3-53
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
use ApiClients\Client\GitHub\Schema\LicenseSimple;
99
use ApiClients\Client\GitHub\Schema\OrganizationSimpleWebhooks;
1010
use ApiClients\Client\GitHub\Schema\RepositoryWebhooks;
11+
use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties;
1112
use ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository;
1213
use ApiClients\Client\GitHub\Schema\SimpleInstallation;
1314
use ApiClients\Client\GitHub\Schema\SimpleUser;
1415
use ApiClients\Client\GitHub\Schema\SimpleUserWebhooks;
1516
use ApiClients\Client\GitHub\Schema\WebhookFork;
1617
use ApiClients\Client\GitHub\Schema\WebhookFork\Forkee;
17-
use ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\CustomProperties;
1818
use ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\License;
1919
use ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\Owner;
2020
use ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\Permissions;
@@ -69,7 +69,6 @@ public function hydrateObject(string $className, array $payload): object
6969
'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Owner' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Owner($payload),
7070
'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\TemplateRepository\Permissions' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️TemplateRepository⚡️Permissions($payload),
7171
'ApiClients\Client\GitHub\Schema\SimpleUserWebhooks' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUserWebhooks($payload),
72-
'ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookFork⚡️Forkee⚡️CustomProperties($payload),
7372
'ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties($payload),
7473
default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack),
7574
};
@@ -557,26 +556,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh
557556

558557
after_createdAt:
559558

560-
$value = $payload['custom_properties'] ?? null;
561-
562-
if ($value === null) {
563-
$properties['customProperties'] = null;
564-
goto after_customProperties;
565-
}
566-
567-
if (is_array($value)) {
568-
try {
569-
$this->hydrationStack[] = 'customProperties';
570-
$value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookFork⚡️Forkee⚡️CustomProperties($value);
571-
} finally {
572-
array_pop($this->hydrationStack);
573-
}
574-
}
575-
576-
$properties['customProperties'] = $value;
577-
578-
after_customProperties:
579-
580559
$value = $payload['default_branch'] ?? null;
581560

582561
if ($value === null) {
@@ -5106,13 +5085,13 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Simp
51065085
}
51075086
}
51085087

5109-
private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookFork⚡️Forkee⚡️CustomProperties(array $payload): CustomProperties
5088+
private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties(array $payload): CustomProperties
51105089
{
51115090
$properties = [];
51125091
$missingFields = [];
51135092
try {
51145093
} catch (Throwable $exception) {
5115-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\CustomProperties', $exception, stack: $this->hydrationStack);
5094+
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack);
51165095
}
51175096

51185097
if (count($missingFields) > 0) {
@@ -5121,26 +5100,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh
51215100

51225101
try {
51235102
return new CustomProperties(...$properties);
5124-
} catch (Throwable $exception) {
5125-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookFork\Forkee\CustomProperties', $exception, stack: $this->hydrationStack);
5126-
}
5127-
}
5128-
5129-
private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RepositoryWebhooks⚡️CustomProperties(array $payload): \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties
5130-
{
5131-
$properties = [];
5132-
$missingFields = [];
5133-
try {
5134-
} catch (Throwable $exception) {
5135-
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack);
5136-
}
5137-
5138-
if (count($missingFields) > 0) {
5139-
throw UnableToHydrateObject::dueToMissingFields(\ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties::class, $missingFields, stack: $this->hydrationStack);
5140-
}
5141-
5142-
try {
5143-
return new \ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties(...$properties);
51445103
} catch (Throwable $exception) {
51455104
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RepositoryWebhooks\CustomProperties', $exception, stack: $this->hydrationStack);
51465105
}
@@ -5452,15 +5411,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
54525411
$createdAt = $object->createdAt;
54535412
after_createdAt: $result['created_at'] = $createdAt;
54545413

5455-
$customProperties = $object->customProperties;
5456-
5457-
if ($customProperties === null) {
5458-
goto after_customProperties;
5459-
}
5460-
5461-
$customProperties = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookFork⚡️Forkee⚡️CustomProperties($customProperties);
5462-
after_customProperties: $result['custom_properties'] = $customProperties;
5463-
54645414
$defaultBranch = $object->defaultBranch;
54655415
after_defaultBranch: $result['default_branch'] = $defaultBranch;
54665416

0 commit comments

Comments
 (0)