diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 56629141d4b..f03355fb67a 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "5111760c5ff914fc4c83cde28d085440", + "specHash": "f7468d269476e7c0c11c8b67322a69a1", "generatedFiles": { "files": [ { @@ -348,7 +348,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Runner.php", - "hash": "3788279a58cf0444b5e8ac4bac2c96e3" + "hash": "9eb473fcd7876dc8e66410cf824facc8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RunnerApplication.php", @@ -4480,7 +4480,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersForOrg\/Response\/ApplicationJson\/Ok.php", - "hash": "c5d16e5ba1a96f8beca934ed85fbe67b" + "hash": "c0ef6521ea75f8ff323af6219e897ea4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListLabelsForSelfHostedRunnerForOrg\/Response\/ApplicationJson\/Ok.php", @@ -5564,7 +5564,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", - "hash": "6cfc2e1d06fc380bf66cb736ffc55125" + "hash": "ee82d3b058b82ee9d387cfbe1d78d52e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -5600,7 +5600,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", - "hash": "a017d588c5b04a9f637de041dd114a34" + "hash": "109c702326dc8aca867d2bb5df05cd70" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Teams.php", @@ -11010,17 +11010,13 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Projects\/CreateCard\/Response\/ApplicationJson\/UnprocessableEntity.php", "hash": "7733a616bba537ad14269c392c95ce1a" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet2329E85F\/Tiet2404E7BA\/TietF6C81F1C\/Tiet1EE267CF.php", - "hash": "aa2b30cb40a5655fd074c80f59fa6ca1" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersForRepo\/Response\/ApplicationJson\/Ok.php", - "hash": "50a4938b787a019765aa829d8413a864" + "hash": "fbacde22337ecd5b80d95f3de843cfdf" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersForRepo\/Response\/ApplicationJson\/Ok\/Application\/Json.php", - "hash": "d33dbea130ae1d25f1e26c11ca24e6d0" + "hash": "ebbc85529a4d2d72e9ef25f34fb9f8b9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet465FFE22\/Tiet83692C35\/TietB7E35CD3\/TietF31B8C6B.php", @@ -11568,7 +11564,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GenerateRunnerJitconfigForOrg\/Response\/ApplicationJson\/Created.php", - "hash": "a0631e6fa2bc4c654e232fbbe75da832" + "hash": "e43662482f4f302739630a118db2a954" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleRulesetInfo.php", @@ -13304,15 +13300,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForOrg.php", - "hash": "cf0de69007f289beec8dcf4278b8c973" + "hash": "afddb9725e6befd38adc33f97e2b846c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GenerateRunnerJitconfigForOrg.php", - "hash": "dda35c1df25aa178dd350dd32c8bc725" + "hash": "e882e339f1a4e5dbbd5e3a2186bbf27f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForOrgTest.php", - "hash": "b5a4c546ea934c2c6056758a89c0b74c" + "hash": "8d38e86616453487b5af59cd77fc3dcb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/CreateRegistrationTokenForOrg.php", @@ -16304,15 +16300,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForRepo.php", - "hash": "94191ae61f4834c50a1dfc0244b2b733" + "hash": "a374295e98378dfa62bbddbccef4c785" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GenerateRunnerJitconfigForRepo.php", - "hash": "dd32db3e9844f32fe7138e0844417409" + "hash": "51f95c068dfc5397d0caad39ad9c69c2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForRepoTest.php", - "hash": "58ce464d154ed0cf569493ca81482ce9" + "hash": "d77a03a14b0bd7721ee90b0a8282fd9a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/CreateRegistrationTokenForRepo.php", @@ -24424,7 +24420,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Billing.php", - "hash": "b5af76cf9b440520b40680246dfd76a0" + "hash": "e9e63e54539847856b0b389cc89aba31" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Checks.php", @@ -24476,7 +24472,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Actions.php", - "hash": "c29bf069848970b6bf2aa7a3bad4ea13" + "hash": "600053290882abe489d86c6c74f32291" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Codespaces.php", @@ -24856,7 +24852,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "d5e6cb0b5c43bcb0926a401ff8b31c45" + "hash": "c4a7e9ba89e7cad14e37d8076a8a4817" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -24880,7 +24876,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", - "hash": "9d52e88c5af6aa5a666a418c7149880a" + "hash": "c1a0b296bfca651a7e4126fed2d81307" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", @@ -24896,7 +24892,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Seven.php", - "hash": "8dd6cfc374d16ab64138cebccf8d4d15" + "hash": "6e130578b6660dbe7434e3885b56b507" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Eight.php", @@ -25292,7 +25288,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/GenerateJitconfig.php", - "hash": "606056a60a74f0bd5830673e1ceaac84" + "hash": "eef5a008e59fc6a5a75ab1cd38360359" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/RegistrationToken.php", @@ -25304,7 +25300,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/RunnerId.php", - "hash": "119e1dd66d0043ee8a32deb7097613af" + "hash": "364e52d1453f713034ad4846e0a27199" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/RunnerId\/Labels.php", @@ -25776,7 +25772,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/GenerateJitconfig.php", - "hash": "29f9ca85c2e04f05de536a7a8ef4e3a3" + "hash": "fe23bef0427ff3f9337089f07979f04a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/RegistrationToken.php", @@ -25788,7 +25784,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/RunnerId.php", - "hash": "e9b54c876ed8cc2e224048b7fb7667e2" + "hash": "b6dee146c8939b090f2565a19cda3d44" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/RunnerId\/Labels.php", @@ -27632,11 +27628,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "cb4f797dc05020132ffc3619950c39e6" + "hash": "9a0ea71bba7f5f28a38d3c96fccb89b3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "0b533e50490546f5b357153d457ee8f5" + "hash": "12e8aab39fe3efb63af28af4572cf1ff" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -30316,7 +30312,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersInGroupForOrg\/Response\/ApplicationJson\/Ok.php", - "hash": "aa49bb2534c543391541d143b08e6597" + "hash": "dd2cfd6ca711f208768c6edca9e7fad6" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Actions\/SetSelfHostedRunnersInGroupForOrg\/Request\/ApplicationJson.php", @@ -30844,7 +30840,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Billing\/GetGithubBillingUsageReportOrg.php", - "hash": "4787686505d8e5946b3fdf813b8a5ec5" + "hash": "7624d94358737de3424ffb2dc614ce55" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Billing\/GetGithubBillingUsageReportOrgTest.php", @@ -31841,6 +31837,10 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietADA0376A\/TietE291E6D1\/Tiet2A83A4E8\/TietFA266CAF.php", "hash": "36e946b712654adbe28f4840593a93f1" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEAB1E353\/TietA691FF98\/TietCADB7922\/TietA4382CA1.php", + "hash": "436ec94751c59383bcf6e3bd4edfcda9" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php index b48dcaac4b9..6badb120e62 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php @@ -182,6 +182,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Runn $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -462,6 +473,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php index 1d9fa7e34cb..ada3e4aa06d 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php @@ -124,6 +124,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Runn $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -271,6 +282,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php index c876c2c1086..722053e025b 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php @@ -182,6 +182,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Runn $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -462,6 +473,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php index a39eaf433d3..ae432b01231 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php @@ -124,6 +124,17 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Runn $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -271,6 +282,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php b/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php index 01d6dd49d81..19f45a81806 100644 --- a/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php +++ b/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php @@ -69,6 +69,14 @@ public function createResponse(ResponseInterface $response): Schema\Operations\A $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationErrorSimple::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); throw new ErrorSchemas\ValidationErrorSimple(422, $this->hydrator->hydrateObject(Schema\ValidationErrorSimple::class, $body)); + /** + * Conflict + **/ + + case 409: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); } break; diff --git a/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php b/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php index 68345298eab..0a43e9b8776 100644 --- a/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php +++ b/clients/GitHub/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php @@ -72,6 +72,14 @@ public function createResponse(ResponseInterface $response): Schema\Operations\A $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationErrorSimple::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); throw new ErrorSchemas\ValidationErrorSimple(422, $this->hydrator->hydrateObject(Schema\ValidationErrorSimple::class, $body)); + /** + * Conflict + **/ + + case 409: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); } break; diff --git a/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php b/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php index 03bf9c943c0..9d2256e744e 100644 --- a/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php +++ b/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $org, array $params): Created { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Actions\GenerateRunnerJitconfigForOrg($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); diff --git a/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php b/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php index 99812424e8d..07b4e03dfaf 100644 --- a/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php +++ b/clients/GitHub/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $owner, string $repo, array $params): Created { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Actions\GenerateRunnerJitconfigForRepo($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo); diff --git a/clients/GitHub/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php b/clients/GitHub/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php index 5902c07b304..3cd795713a8 100644 --- a/clients/GitHub/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php +++ b/clients/GitHub/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, int $year, int $month, int $day, int $hour): BillingUsageReport { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Billing\GetGithubBillingUsageReportOrg($this->responseSchemaValidator, $this->hydrator, $org, $year, $month, $day, $hour); diff --git a/clients/GitHub/src/Internal/Router/Get/Billing.php b/clients/GitHub/src/Internal/Router/Get/Billing.php index 8deb60a0b88..aab92030fa3 100644 --- a/clients/GitHub/src/Internal/Router/Get/Billing.php +++ b/clients/GitHub/src/Internal/Router/Get/Billing.php @@ -22,6 +22,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + /** @return */ public function getGithubBillingUsageReportOrg(array $params): BillingUsageReport { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index 8655affe214..b7cd2b4936e 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -82,7 +82,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Schema\BillingUsageReport|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|CodeSecurityConfiguration|WithoutBody|BillingUsageReport|ActionsCacheUsageOrgEnterprise|Ok|ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsOrg|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|NetworkConfiguration|NetworkSettings|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|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|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|SecretScanningScanHistory|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 { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Post/Actions.php b/clients/GitHub/src/Internal/Router/Post/Actions.php index 0c70538f2d2..8cc4078e546 100644 --- a/clients/GitHub/src/Internal/Router/Post/Actions.php +++ b/clients/GitHub/src/Internal/Router/Post/Actions.php @@ -26,7 +26,6 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return */ public function generateRunnerJitconfigForOrg(array $params): Created { $arguments = []; @@ -158,7 +157,6 @@ public function addCustomLabelsToSelfHostedRunnerForOrg(array $params): Ok return $operator->call($arguments['org'], $arguments['runner_id'], $params); } - /** @return */ public function generateRunnerJitconfigForRepo(array $params): Created { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Post/Seven.php b/clients/GitHub/src/Internal/Router/Post/Seven.php index ef1ba0fbdee..5048580de5b 100644 --- a/clients/GitHub/src/Internal/Router/Post/Seven.php +++ b/clients/GitHub/src/Internal/Router/Post/Seven.php @@ -35,7 +35,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Schema\BasicError */ + /** @return |Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|Observable|Schema\BasicError */ public function call(string $call, array $params, array $pathChunks): Json|Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|WithoutBody|Created|AuthenticationToken|BranchWithProtection|EmptyObject|CodeScanningVariantAnalysis|Reaction|CommitComment|DeploymentStatus|DeploymentBranchPolicy|DeploymentProtectionRule|Issue|IssueComment|iterable|BasicError|Codespace|PullRequestReviewComment|PullRequestSimple|PullRequestReview|ReleaseAsset|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|FullRepository { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Post/Six.php b/clients/GitHub/src/Internal/Router/Post/Six.php index 8f408f2ae2e..c6e8a3e73bb 100644 --- a/clients/GitHub/src/Internal/Router/Post/Six.php +++ b/clients/GitHub/src/Internal/Router/Post/Six.php @@ -34,6 +34,7 @@ public function __construct(private Routers $routers) { } + /** @return |Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created */ public function call(string $call, array $params, array $pathChunks): Json|Created|AuthenticationToken|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|TeamDiscussion|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|EmptyObject|CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|ShortBlob|GitCommit|GitRef|GitTag|GitTree|PageBuildStatus|PageDeployment|ReleaseNotesContent|SecretScanningPushProtectionBypass|RepositoryAdvisory|Status|TagProtection|TeamDiscussionComment|Reaction { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Operation/Actions.php b/clients/GitHub/src/Operation/Actions.php index d826dd2145b..c2566985710 100644 --- a/clients/GitHub/src/Operation/Actions.php +++ b/clients/GitHub/src/Operation/Actions.php @@ -271,7 +271,6 @@ public function listRunnerApplicationsForOrg(string $org): iterable return $this->operators->actions👷ListRunnerApplicationsForOrg()->call($org); } - /** @return */ public function generateRunnerJitconfigForOrg(string $org, array $params): Created { return $this->operators->actions👷GenerateRunnerJitconfigForOrg()->call($org, $params); @@ -601,7 +600,6 @@ public function listRunnerApplicationsForRepo(string $owner, string $repo): iter return $this->operators->actions👷ListRunnerApplicationsForRepo()->call($owner, $repo); } - /** @return */ public function generateRunnerJitconfigForRepo(string $owner, string $repo, array $params): Created { return $this->operators->actions👷GenerateRunnerJitconfigForRepo()->call($owner, $repo, $params); diff --git a/clients/GitHub/src/Operation/Billing.php b/clients/GitHub/src/Operation/Billing.php index a786817639d..1215a24b1b2 100644 --- a/clients/GitHub/src/Operation/Billing.php +++ b/clients/GitHub/src/Operation/Billing.php @@ -16,6 +16,7 @@ public function __construct(private Internal\Operators $operators) { } + /** @return */ public function getGithubBillingUsageReportOrg(string $org, int $year, int $month, int $day, int $hour): BillingUsageReport { return $this->operators->billing👷GetGithubBillingUsageReportOrg()->call($org, $year, $month, $day, $hour); diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index f82fb65e93c..1bd853aa70b 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -488,7 +488,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /organizations/{org}/settings/billing/usage') { - return $this->typeResolver->resolve('Schema\\BillingUsageReport'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}') { @@ -664,7 +664,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /orgs/{org}/actions/runners/generate-jitconfig') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForOrg\\Response\\ApplicationJson\\Created'); } if ($call === 'POST /orgs/{org}/actions/runners/registration-token') { @@ -1992,7 +1992,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForOrg\\Response\\ApplicationJson\\Created'); } if ($call === 'POST /repos/{owner}/{repo}/actions/runners/registration-token') { diff --git a/clients/GitHub/src/Schema/AliasAbstract/Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php b/clients/GitHub/src/Schema/AliasAbstract/TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php similarity index 93% rename from clients/GitHub/src/Schema/AliasAbstract/Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php rename to clients/GitHub/src/Schema/AliasAbstract/TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php index 5d95b1c2244..e7bc5a00811 100644 --- a/clients/GitHub/src/Schema/AliasAbstract/Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php +++ b/clients/GitHub/src/Schema/AliasAbstract/TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace ApiClients\Client\GitHub\Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C; +namespace ApiClients\Client\GitHub\Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922; use EventSauce\ObjectHydrator\MapFrom; -abstract readonly class Tiet1EE267CF +abstract readonly class TietA4382CA1 { public const SCHEMA_JSON = '{ "required": [ @@ -98,6 +98,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -128,7 +131,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, { "id": 5, @@ -148,7 +152,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false } ] }'; diff --git a/clients/GitHub/src/Schema/Operations/Actions/GenerateRunnerJitconfigForOrg/Response/ApplicationJson/Created.php b/clients/GitHub/src/Schema/Operations/Actions/GenerateRunnerJitconfigForOrg/Response/ApplicationJson/Created.php index 365faff9386..63004245644 100644 --- a/clients/GitHub/src/Schema/Operations/Actions/GenerateRunnerJitconfigForOrg/Response/ApplicationJson/Created.php +++ b/clients/GitHub/src/Schema/Operations/Actions/GenerateRunnerJitconfigForOrg/Response/ApplicationJson/Created.php @@ -94,6 +94,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -125,7 +128,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, "encoded_jit_config": "generated" }'; diff --git a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php index 01c8abae925..445cdf262ae 100644 --- a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php +++ b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHub\Schema; -final readonly class Ok extends Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C\Tiet1EE267CF +final readonly class Ok extends Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922\TietA4382CA1 { } diff --git a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php index b86077fe3fb..a6f3c55469f 100644 --- a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php +++ b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHub\Schema; -final readonly class Ok extends Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C\Tiet1EE267CF +final readonly class Ok extends Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922\TietA4382CA1 { } diff --git a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php index a2a94b2dd43..9be7fca2e89 100644 --- a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php +++ b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHub\Schema; -final readonly class Json extends Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C\Tiet1EE267CF +final readonly class Json extends Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922\TietA4382CA1 { } diff --git a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php index 8dc080a064b..2d8fbb3b28b 100644 --- a/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php +++ b/clients/GitHub/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php @@ -98,6 +98,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -128,7 +131,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, { "id": 5, @@ -148,7 +152,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false } ] }'; diff --git a/clients/GitHub/src/Schema/Runner.php b/clients/GitHub/src/Schema/Runner.php index b8ff4030964..75439e8b1a4 100644 --- a/clients/GitHub/src/Schema/Runner.php +++ b/clients/GitHub/src/Schema/Runner.php @@ -86,6 +86,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -110,7 +113,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }'; /** @@ -121,7 +125,7 @@ * status: The status of the runner. */ public function __construct(public int $id, #[MapFrom('runner_group_id')] - public int|null $runnerGroupId, public string $name, public string $os, public string $status, public bool $busy, public array $labels,) + public int|null $runnerGroupId, public string $name, public string $os, public string $status, public bool $busy, public array $labels, public bool|null $ephemeral,) { } } diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php index a7ad0ee78ff..61bc99cfa2e 100644 --- a/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php +++ b/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php @@ -120,4 +120,38 @@ public function operations_httpCode_422_requestContentType_application_json_resp $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->actions()->generateRunnerJitconfigForOrg('generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GenerateRunnerJitconfigForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })(json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->generateRunnerJitconfigForOrg('generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } } diff --git a/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php b/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php index fdcdf49644f..4e33008bada 100644 --- a/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php +++ b/clients/GitHub/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php @@ -123,4 +123,39 @@ public function operations_httpCode_422_requestContentType_application_json_resp $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->actions()->generateRunnerJitconfigForRepo('generated', 'generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/repos/generated/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GenerateRunnerJitconfigForRepo::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/repos/generated/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->generateRunnerJitconfigForRepo('generated', 'generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } } diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 7fab5723448..c9d113464a8 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -128,7 +128,7 @@ function authHeader(): string assertType('', $client->call('DELETE /notifications/threads/{thread_id}/subscription')); assertType('', $client->call('GET /octocat')); assertType('Observable|WithoutBody', $client->call('GET /organizations')); -assertType('Schema\\BillingUsageReport', $client->call('GET /organizations/{org}/settings/billing/usage')); +assertType('', $client->call('GET /organizations/{org}/settings/billing/usage')); assertType('', $client->call('GET /orgs/{org}')); assertType('', $client->call('DELETE /orgs/{org}')); assertType('', $client->call('PATCH /orgs/{org}')); @@ -172,7 +172,7 @@ function authHeader(): string assertType('', $client->call('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}')); assertType('', $client->call('GET /orgs/{org}/actions/runners')); assertType('Observable', $client->call('GET /orgs/{org}/actions/runners/downloads')); -assertType('', $client->call('POST /orgs/{org}/actions/runners/generate-jitconfig')); +assertType('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForOrg\\Response\\ApplicationJson\\Created', $client->call('POST /orgs/{org}/actions/runners/generate-jitconfig')); assertType('', $client->call('POST /orgs/{org}/actions/runners/registration-token')); assertType('', $client->call('POST /orgs/{org}/actions/runners/remove-token')); assertType('', $client->call('GET /orgs/{org}/actions/runners/{runner_id}')); @@ -504,7 +504,7 @@ function authHeader(): string assertType('', $client->call('PUT /repos/{owner}/{repo}/actions/permissions/workflow')); assertType('', $client->call('GET /repos/{owner}/{repo}/actions/runners')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/actions/runners/downloads')); -assertType('', $client->call('POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig')); +assertType('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForOrg\\Response\\ApplicationJson\\Created', $client->call('POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig')); assertType('', $client->call('POST /repos/{owner}/{repo}/actions/runners/registration-token')); assertType('', $client->call('POST /repos/{owner}/{repo}/actions/runners/remove-token')); assertType('', $client->call('GET /repos/{owner}/{repo}/actions/runners/{runner_id}')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index c7814998f7e..2229e268165 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -6381,6 +6381,8 @@ paths: "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed_simple" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -20223,6 +20225,8 @@ paths: "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed_simple" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -37060,7 +37064,6 @@ paths: environment: github-pages pages_build_version: 4fd754f7e594640989b406850d0bc8f06a121251 oidc_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlV2R1h4SUhlY0JFc1JCdEttemUxUEhfUERiVSIsImtpZCI6IjUyRjE5N0M0ODFERTcwMTEyQzQ0MUI0QTlCMzdCNTNDN0ZDRjBEQjUifQ.eyJqdGkiOiJhMWIwNGNjNy0zNzZiLTQ1N2QtOTMzNS05NTY5YmVjZDExYTIiLCJzdWIiOiJyZXBvOnBhcGVyLXNwYS9taW55aTplbnZpcm9ubWVudDpQcm9kdWN0aW9uIiwiYXVkIjoiaHR0cHM6Ly9naXRodWIuY29tL3BhcGVyLXNwYSIsInJlZiI6InJlZnMvaGVhZHMvbWFpbiIsInNoYSI6ImEyODU1MWJmODdiZDk3NTFiMzdiMmM0YjM3M2MxZjU3NjFmYWM2MjYiLCJyZXBvc2l0b3J5IjoicGFwZXItc3BhL21pbnlpIiwicmVwb3NpdG9yeV9vd25lciI6InBhcGVyLXNwYSIsInJ1bl9pZCI6IjE1NDY0NTkzNjQiLCJydW5fbnVtYmVyIjoiMzQiLCJydW5fYXR0ZW1wdCI6IjYiLCJhY3RvciI6IllpTXlzdHkiLCJ3b3JrZmxvdyI6IkNJIiwiaGVhZF9yZWYiOiIiLCJiYXNlX3JlZiI6IiIsImV2ZW50X25hbWUiOiJwdXNoIiwicmVmX3R5cGUiOiJicmFuY2giLCJlbnZpcm9ubWVudCI6IlByb2R1Y3Rpb24iLCJqb2Jfd29ya2Zsb3dfcmVmIjoicGFwZXItc3BhL21pbnlpLy5naXRodWIvd29ya2Zsb3dzL2JsYW5rLnltbEByZWZzL2hlYWRzL21haW4iLCJpc3MiOiJodHRwczovL3Rva2VuLmFjdGlvbnMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwibmJmIjoxNjM5MDAwODU2LCJleHAiOjE2MzkwMDE3NTYsImlhdCI6MTYzOTAwMTQ1Nn0.VP8WictbQECKozE2SgvKb2FqJ9hisWsoMkYRTqfBrQfZTCXi5IcFEdgDMB2X7a99C2DeUuTvHh9RMKXLL2a0zg3-Sd7YrO7a2ll2kNlnvyIypcN6AeIc7BxHsTTnZN9Ud_xmEsTrSRGOEKmzCFkULQ6N4zlVD0sidypmXlMemmWEcv_ZHqhioEI_VMp5vwXQurketWH7qX4oDgG4okyYtPrv5RQHbfQcVo9izaPJ_jnsDd0CBA0QOx9InjPidtIkMYQLyUgJy33HLJy86EFNUnAf8UhBQuQi5mAsEpEzBBuKpG3PDiPtYCHOk64JZkZGd5mR888a5sbHRiaF8hm8YA - preview: false responses: '200': description: Response @@ -74917,6 +74920,8 @@ components: type: array items: "$ref": "#/components/schemas/runner-label" + ephemeral: + type: boolean required: - id - name @@ -207501,6 +207506,7 @@ components: os: linux status: online busy: true + ephemeral: false labels: - id: 5 name: self-hosted @@ -207516,6 +207522,7 @@ components: os: macos status: offline busy: false + ephemeral: false labels: - id: 5 name: self-hosted @@ -207588,6 +207595,7 @@ components: os: macos status: online busy: true + ephemeral: false labels: - id: 5 name: self-hosted