Skip to content

Commit e467c77

Browse files
authored
Merge pull request #1177 from php-api-clients/GitHub/from-1.1.4-6427e6326d9646fc1b49f1e1dcf2d9db-from-1.1.4-6427e6326d9646fc1b49f1e1dcf2d9db
2 parents a7a19ad + 183028b commit e467c77

File tree

13 files changed

+126
-19
lines changed

13 files changed

+126
-19
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "e19bc15f772c4b3caf0034592e8e59db",
2+
"specHash": "6427e6326d9646fc1b49f1e1dcf2d9db",
33
"generatedFiles": {
44
"files": [
55
{
@@ -52,7 +52,7 @@
5252
},
5353
{
5454
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/HookDeliveryItem.php",
55-
"hash": "92b885b2dd522f785b6df7eb60288cbe"
55+
"hash": "04479f6019622c2dabb386ebc587c972"
5656
},
5757
{
5858
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ScimError.php",
@@ -72,7 +72,7 @@
7272
},
7373
{
7474
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/HookDelivery.php",
75-
"hash": "3c353f627845f8936e560b37b14b316e"
75+
"hash": "5495e2ba35602a1566006ebf77f88a34"
7676
},
7777
{
7878
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Enterprise.php",
@@ -5616,7 +5616,7 @@
56165616
},
56175617
{
56185618
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php",
5619-
"hash": "e5f60d41b8ace0bdfc8615cf94ac657f"
5619+
"hash": "4c7a840e4808d0c8d6ffd9144fd81247"
56205620
},
56215621
{
56225622
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php",
@@ -5648,7 +5648,7 @@
56485648
},
56495649
{
56505650
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Pulls.php",
5651-
"hash": "c04a3852a873caba1c1cb5fa1d6809ce"
5651+
"hash": "60138d3a0e61f4cd49819b25927d75b3"
56525652
},
56535653
{
56545654
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/SecurityAdvisories.php",
@@ -20516,7 +20516,7 @@
2051620516
},
2051720517
{
2051820518
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Pulls\/Get.php",
20519-
"hash": "92889b523b752b34c4fc662a887df619"
20519+
"hash": "73ee842fc0292c59dc2200e2846b63bb"
2052020520
},
2052120521
{
2052220522
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Pulls\/GetTest.php",
@@ -24604,7 +24604,7 @@
2460424604
},
2460524605
{
2460624606
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php",
24607-
"hash": "e632b6b1ae6e372daddc51110fac546a"
24607+
"hash": "5b1290dc5c87df2b913fae08560df1aa"
2460824608
},
2460924609
{
2461024610
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Billing.php",
@@ -25040,7 +25040,7 @@
2504025040
},
2504125041
{
2504225042
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
25043-
"hash": "5d810b435cc9e1551a09c8f901cd27b0"
25043+
"hash": "147555754780b5408e6bdfb6561e2110"
2504425044
},
2504525045
{
2504625046
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
@@ -25276,7 +25276,7 @@
2527625276
},
2527725277
{
2527825278
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App\/Hook\/Deliveries\/DeliveryId.php",
25279-
"hash": "47feb9b49e6215f80ff2d4ec60890fc9"
25279+
"hash": "59cbfb453048b190c8c4f8b1aecfe5f6"
2528025280
},
2528125281
{
2528225282
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/App\/Hook\/Deliveries\/DeliveryId\/Attempts.php",
@@ -25628,7 +25628,7 @@
2562825628
},
2562925629
{
2563025630
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Hooks\/HookId\/Deliveries\/DeliveryId.php",
25631-
"hash": "21e98ecb53629e1528b00921a3968927"
25631+
"hash": "6d00f59f96bd5eb2a1c5debb4150101b"
2563225632
},
2563325633
{
2563425634
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Hooks\/HookId\/Deliveries\/DeliveryId\/Attempts.php",
@@ -26460,7 +26460,7 @@
2646026460
},
2646126461
{
2646226462
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Hooks\/HookId\/Deliveries\/DeliveryId.php",
26463-
"hash": "1b183938442baa2681944824fead16cc"
26463+
"hash": "32d45f73b17491a056d6b8069b26b981"
2646426464
},
2646526465
{
2646626466
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Hooks\/HookId\/Deliveries\/DeliveryId\/Attempts.php",
@@ -27868,11 +27868,11 @@
2786827868
},
2786927869
{
2787027870
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
27871-
"hash": "68ec3d3764eb8e18c8d6dc8ebfa25e1d"
27871+
"hash": "51b4dab62e2beb85905e195adc171a76"
2787227872
},
2787327873
{
2787427874
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
27875-
"hash": "8e59998f6b2a1a28b19a2e8bdcaf4d8f"
27875+
"hash": "3436911a55388d4ad5fe3a863f381079"
2787627876
},
2787727877
{
2787827878
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",

clients/GitHub/src/Internal/Hydrator/Operation/App/Hook/Deliveries/DeliveryId.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Hook
186186

187187
after_repositoryId:
188188

189+
$value = $payload['throttled_at'] ?? null;
190+
191+
if ($value === null) {
192+
$properties['throttledAt'] = null;
193+
goto after_throttledAt;
194+
}
195+
196+
$properties['throttledAt'] = $value;
197+
198+
after_throttledAt:
199+
189200
$value = $payload['url'] ?? null;
190201

191202
if ($value === null) {
@@ -772,6 +783,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
772783

773784
after_repositoryId: $result['repository_id'] = $repositoryId;
774785

786+
$throttledAt = $object->throttledAt;
787+
788+
if ($throttledAt === null) {
789+
goto after_throttledAt;
790+
}
791+
792+
after_throttledAt: $result['throttled_at'] = $throttledAt;
793+
775794
$url = $object->url;
776795

777796
if ($url === null) {

clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Hooks/HookId/Deliveries/DeliveryId.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Hook
186186

187187
after_repositoryId:
188188

189+
$value = $payload['throttled_at'] ?? null;
190+
191+
if ($value === null) {
192+
$properties['throttledAt'] = null;
193+
goto after_throttledAt;
194+
}
195+
196+
$properties['throttledAt'] = $value;
197+
198+
after_throttledAt:
199+
189200
$value = $payload['url'] ?? null;
190201

191202
if ($value === null) {
@@ -772,6 +783,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
772783

773784
after_repositoryId: $result['repository_id'] = $repositoryId;
774785

786+
$throttledAt = $object->throttledAt;
787+
788+
if ($throttledAt === null) {
789+
goto after_throttledAt;
790+
}
791+
792+
after_throttledAt: $result['throttled_at'] = $throttledAt;
793+
775794
$url = $object->url;
776795

777796
if ($url === null) {

clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Hooks/HookId/Deliveries/DeliveryId.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Hook
186186

187187
after_repositoryId:
188188

189+
$value = $payload['throttled_at'] ?? null;
190+
191+
if ($value === null) {
192+
$properties['throttledAt'] = null;
193+
goto after_throttledAt;
194+
}
195+
196+
$properties['throttledAt'] = $value;
197+
198+
after_throttledAt:
199+
189200
$value = $payload['url'] ?? null;
190201

191202
if ($value === null) {
@@ -772,6 +783,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema
772783

773784
after_repositoryId: $result['repository_id'] = $repositoryId;
774785

786+
$throttledAt = $object->throttledAt;
787+
788+
if ($throttledAt === null) {
789+
goto after_throttledAt;
790+
}
791+
792+
after_throttledAt: $result['throttled_at'] = $throttledAt;
793+
775794
$url = $object->url;
776795

777796
if ($url === null) {

clients/GitHub/src/Internal/Operator/Pulls/Get.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, int $pullNumber): PullRequest|WithoutBody
2930
{
3031
$operation = new \ApiClients\Client\GitHub\Internal\Operation\Pulls\Get($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $pullNumber);

clients/GitHub/src/Internal/Router/Get/Pulls.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public function listReviewCommentsForRepo(array $params): iterable
138138
return $operator->call($arguments['owner'], $arguments['repo'], $arguments['sort'], $arguments['direction'], $arguments['since'], $arguments['per_page'], $arguments['page']);
139139
}
140140

141+
/** @return */
141142
public function get(array $params): PullRequest|WithoutBody
142143
{
143144
$arguments = [];

clients/GitHub/src/Internal/Router/Get/Six.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(private Routers $routers)
7373
{
7474
}
7575

76-
/** @return Observable<Schema\MarketplacePurchase>||Observable<Schema\RunnerApplication>|Observable<Schema\HookDeliveryItem>|Observable<Schema\Team>|Observable<Schema\MinimalRepository>|WithoutBody|Observable<Schema\SimpleUser>|Observable<Schema\TeamDiscussion>|Observable<Schema\OrganizationInvitation>|Observable<Schema\TeamProject>|Observable<Schema\CodeScanningAlertItems>|Observable<Schema\CodeScanningAnalysis>|Observable<Schema\DependabotAlert>|Observable<Schema\PorterAuthor>|Observable<Schema\PorterLargeFile>|Observable<Schema\IssueComment>|Observable<Schema\IssueEvent>|Observable<Schema\PageBuild>|Observable<Schema\CustomPropertyValue>|Observable<Schema\PullRequestReviewComment>|Schema\PullRequest|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable<Schema\RuleSuites>|Observable<Schema\SecretScanningAlert>|Observable<int>|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable<Schema\CommitActivity>|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable<Schema\ContributorActivity>|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable<Schema\TagProtection>|Observable<Schema\TeamDiscussionComment>|Observable<Schema\Reaction>|Observable<Schema\PackageVersion>|Observable<Schema\Event> */
76+
/** @return Observable<Schema\MarketplacePurchase>||Observable<Schema\RunnerApplication>|Observable<Schema\HookDeliveryItem>|Observable<Schema\Team>|Observable<Schema\MinimalRepository>|WithoutBody|Observable<Schema\SimpleUser>|Observable<Schema\TeamDiscussion>|Observable<Schema\OrganizationInvitation>|Observable<Schema\TeamProject>|Observable<Schema\CodeScanningAlertItems>|Observable<Schema\CodeScanningAnalysis>|Observable<Schema\DependabotAlert>|Observable<Schema\PorterAuthor>|Observable<Schema\PorterLargeFile>|Observable<Schema\IssueComment>|Observable<Schema\IssueEvent>|Observable<Schema\PageBuild>|Observable<Schema\CustomPropertyValue>|Observable<Schema\PullRequestReviewComment>|Observable<Schema\RuleSuites>|Observable<Schema\SecretScanningAlert>|Observable<int>|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable<Schema\CommitActivity>|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable<Schema\ContributorActivity>|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable<Schema\TagProtection>|Observable<Schema\TeamDiscussionComment>|Observable<Schema\Reaction>|Observable<Schema\PackageVersion>|Observable<Schema\Event> */
7777
public function call(string $call, array $params, array $pathChunks): iterable|ActionsCacheUsageOrgEnterprise|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|Json|WithoutBody|CopilotSeatDetails|Package|OrgCustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails
7878
{
7979
if ($pathChunks[0] === '') {

clients/GitHub/src/Operation/Pulls.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function updateReviewComment(string $owner, string $repo, int $commentId,
6969
return $this->operators->pulls👷UpdateReviewComment()->call($owner, $repo, $commentId, $params);
7070
}
7171

72+
/** @return */
7273
public function get(string $owner, string $repo, int $pullNumber): PullRequest|WithoutBody
7374
{
7475
return $this->operators->pulls👷Get()->call($owner, $repo, $pullNumber);

clients/GitHub/src/PHPStan/ClientCallReturnTypes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3180,7 +3180,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
31803180
}
31813181

31823182
if ($call === 'GET /repos/{owner}/{repo}/pulls/{pull_number}') {
3183-
return $this->typeResolver->resolve('Schema\\PullRequest|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody');
3183+
return $this->typeResolver->resolve('');
31843184
}
31853185

31863186
if ($call === 'PATCH /repos/{owner}/{repo}/pulls/{pull_number}') {

clients/GitHub/src/Schema/HookDelivery.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,17 @@
115115
123
116116
]
117117
},
118+
"throttled_at": {
119+
"type": [
120+
"string",
121+
"null"
122+
],
123+
"description": "Time when the webhook delivery was throttled.",
124+
"format": "date-time",
125+
"examples": [
126+
"2021-05-12T20:33:44Z"
127+
]
128+
},
118129
"url": {
119130
"type": "string",
120131
"description": "The URL target of the delivery.",
@@ -189,6 +200,7 @@
189200
"action": "opened",
190201
"installation_id": 123,
191202
"repository_id": 123,
203+
"throttled_at": "2021-05-12T20:33:44Z",
192204
"url": "https:\\/\\/www.example.com",
193205
"request": {
194206
"headers": [],
@@ -212,13 +224,15 @@
212224
* action: The type of activity for the event that triggered the delivery.
213225
* installationId: The id of the GitHub App installation associated with this event.
214226
* repositoryId: The id of the repository associated with this event.
227+
* throttledAt: Time when the webhook delivery was throttled.
215228
* url: The URL target of the delivery.
216229
*/
217230
public function __construct(public int $id, public string $guid, #[MapFrom('delivered_at')]
218231
public string $deliveredAt, public bool $redelivery, public int|float $duration, public string $status, #[MapFrom('status_code')]
219232
public int $statusCode, public string $event, public string|null $action, #[MapFrom('installation_id')]
220233
public int|null $installationId, #[MapFrom('repository_id')]
221-
public int|null $repositoryId, public string|null $url, public Schema\HookDelivery\Request $request, public Schema\HookDelivery\Response $response,)
234+
public int|null $repositoryId, #[MapFrom('throttled_at')]
235+
public string|null $throttledAt, public string|null $url, public Schema\HookDelivery\Request $request, public Schema\HookDelivery\Response $response,)
222236
{
223237
}
224238
}

0 commit comments

Comments
 (0)