diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index 52d40d291b0..f80c64d4ec1 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -8756,6 +8756,82 @@ $client->operations()->repos()->deleteOrgRuleset( org: 'generated', You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/rules#delete-an-organization-repository-ruleset). +### orgs/get-org-ruleset-history + +Get organization ruleset history + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/rulesets/{ruleset_id}/history', [ + 'org' => 'generated', + 'ruleset_id' => 10, + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->orgs()->getOrgRulesetHistory( org: 'generated', + ruleset_id: 10, + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/rules#get-organization-ruleset-history). + + +### orgs/get-org-ruleset-history + +Get organization ruleset history + +Using the `call` method: +```php +$client->call('LIST /orgs/{org}/rulesets/{ruleset_id}/history', [ + 'org' => 'generated', + 'ruleset_id' => 10, + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->orgs()->getOrgRulesetHistoryListing( org: 'generated', + ruleset_id: 10, + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/rules#get-organization-ruleset-history). + + +### orgs/get-org-ruleset-version + +Get organization ruleset version + +Using the `call` method: +```php +$client->call('GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}', [ + 'org' => 'generated', + 'ruleset_id' => 10, + 'version_id' => 10, +]); +``` + +Operations method: +```php +$client->operations()->orgs()->getOrgRulesetVersion( org: 'generated', + ruleset_id: 10, + version_id: 10, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/rules#get-organization-ruleset-version). + + ### secret-scanning/list-alerts-for-org List secret scanning alerts for an organization @@ -22913,6 +22989,88 @@ $client->operations()->repos()->deleteRepoRuleset( owner: 'generated', You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/rules#delete-a-repository-ruleset). +### repos/get-repo-ruleset-history + +Get repository ruleset history + +Using the `call` method: +```php +$client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'ruleset_id' => 10, + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->repos()->getRepoRulesetHistory( owner: 'generated', + repo: 'generated', + ruleset_id: 10, + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/rules#get-repository-ruleset-history). + + +### repos/get-repo-ruleset-history + +Get repository ruleset history + +Using the `call` method: +```php +$client->call('LIST /repos/{owner}/{repo}/rulesets/{ruleset_id}/history', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'ruleset_id' => 10, + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->repos()->getRepoRulesetHistoryListing( owner: 'generated', + repo: 'generated', + ruleset_id: 10, + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/rules#get-repository-ruleset-history). + + +### repos/get-repo-ruleset-version + +Get repository ruleset version + +Using the `call` method: +```php +$client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}', [ + 'owner' => 'generated', + 'repo' => 'generated', + 'ruleset_id' => 10, + 'version_id' => 10, +]); +``` + +Operations method: +```php +$client->operations()->repos()->getRepoRulesetVersion( owner: 'generated', + repo: 'generated', + ruleset_id: 10, + version_id: 10, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/repos/rules#get-repository-ruleset-version). + + ### secret-scanning/list-alerts-for-repo List secret scanning alerts for a repository diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 8540f9809df..0defd3eb6d8 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "d8074bd9e0c6a1faac9d78d77016fd5e", + "specHash": "9cd6c8e7bead01c0c83af26875ff027b", "generatedFiles": { "files": [ { @@ -5500,11 +5500,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/ClientInterface.php", - "hash": "c965055f081a6be39ce2fcb359fec214" + "hash": "0c51c1106589ec2fe327f0dde2c7ebf4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Client.php", - "hash": "56a701f55ef549104149cb8fc7972266" + "hash": "f88aec7fe4601f27c132fcd212819a1f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/OperationsInterface.php", @@ -5560,7 +5560,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "d50589878cf63e2f0075fcf60232384d" + "hash": "fb57ccbdc48e55ebd107262fd35da447" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -5596,7 +5596,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "736deb4195c1c2f43079eab132469082" + "hash": "f86b83693ea93e0e58523ea351016002" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -24348,7 +24348,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "41a7cff5ee99b680da17998af407ec1e" + "hash": "254036f9fbac1f1fef4d47c0ac4a1073" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -24356,7 +24356,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "aba5e648fd688e82d05fc311741523d4" + "hash": "5dd0f11097043ed3c3a06483ed906506" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", @@ -24624,7 +24624,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Orgs.php", - "hash": "ad35a33e88f87a7f238a20ad01d28c8a" + "hash": "4059dd99657a10c4b9b37faf52aacc34" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Packages.php", @@ -24632,7 +24632,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php", - "hash": "f96eff0ce1b57f94ce916cf82caf94ff" + "hash": "12b09c2e771cd10bde5a786238107288" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php", @@ -24852,15 +24852,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "c4a7e9ba89e7cad14e37d8076a8a4817" + "hash": "29cca7635a6ae094716f95605ed2ef49" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "4ce2c45625d4d9234cdee1e9493e6413" + "hash": "cee75c72f4cf24374fc5ecf5f40abdb0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", - "hash": "1d784a95efa3fb3685799dd206b61214" + "hash": "78ea6ac926677ffd02d2d2380f7bf45b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Nine.php", @@ -24956,11 +24956,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "71625fca086e278619781593e380e8fb" + "hash": "4cf5eb8d6b9243befa96df8588ede644" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", - "hash": "427b3e5f3a3a5b1be5ab000cba3c001c" + "hash": "d5e736b608a30e5e23fd33620e7adf6d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Eight.php", @@ -25056,7 +25056,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "b3ff5d6199a8c9371c2442c528adf919" + "hash": "bdb4e179632891ccd085cbe66ebe0a34" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -27048,7 +27048,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "7f0c07c0d6c355027282e907eef1c7f2" + "hash": "b18e385c22f18997f0e67844fffe5f75" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27628,11 +27628,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "30e758ef83b790f4c37e1a0186d4f74f" + "hash": "7239ab56003d1fbe57bbb031a994720c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "ec7f8ec78c02c33e4922254efeb7a889" + "hash": "ee331eaf657a4f78ca06869e4b0e6ecc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -31841,6 +31841,106 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEAB1E353\/TietA691FF98\/TietCADB7922\/TietA4382CA1.php", "hash": "436ec94751c59383bcf6e3bd4edfcda9" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/GetOrgRulesetHistory.php", + "hash": "4f8472ed53eb81bb8945ab41d304228a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/GetOrgRulesetHistory.php", + "hash": "50adf3d1b110a6650689293b138266f5" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/GetOrgRulesetHistoryTest.php", + "hash": "43deaf0050e46ff1b70a12ff1449f5c1" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/GetOrgRulesetHistoryListing.php", + "hash": "c6cf25cf5fb5b9c1728b5af0c527cd91" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/GetOrgRulesetHistoryListing.php", + "hash": "6b09d075bd9bc0993de72fe64ef15b7c" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/GetOrgRulesetHistoryListingTest.php", + "hash": "20487507abc09018234678cc71eaf96a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/GetOrgRulesetVersion.php", + "hash": "c62fd38f5c0e31699b3d07764d72ba68" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/GetOrgRulesetVersion.php", + "hash": "fb58dd072af0f4e3f5dd9384d1059571" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/GetOrgRulesetVersionTest.php", + "hash": "157adff67b3331a8709da044ddc0d4e0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRulesetHistory.php", + "hash": "277b802d5079135baeb12988ea2e3c5f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesetHistory.php", + "hash": "8f23ace7c2d1f6ef5fb7addf001ceb7a" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetHistoryTest.php", + "hash": "3439e88e8a273bb3cb15604b38419f0b" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRulesetHistoryListing.php", + "hash": "c7b0f15a361444d654d389e10c375d03" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesetHistoryListing.php", + "hash": "31ca89fbc35b18f48c7f41e10d6aeefd" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetHistoryListingTest.php", + "hash": "8089593b9d5c4de9e3d1168df1435abf" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRulesetVersion.php", + "hash": "9cff78886506e51740760c6d3e3b3a4d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesetVersion.php", + "hash": "88ecf5ec825eddae81f9dac5cb31c77d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetVersionTest.php", + "hash": "efdb688e7b94c46efa6e8a30b05944d4" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RulesetVersion.php", + "hash": "c4dd16c397955a8580ae8fbc07b1ae77" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RulesetVersionWithState.php", + "hash": "ef84cdfd57adfbff97a09ad05aacfc1f" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RulesetVersion\/Actor.php", + "hash": "57d220d8410ec1bc439bd30deda354f0" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Rulesets\/RulesetId\/History.php", + "hash": "d776e3c280c87009588d4fc949c1d2ea" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Rulesets\/RulesetId\/History\/VersionId.php", + "hash": "81368b964c2e08d0988840c0e70f18ff" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Rulesets\/RulesetId\/History.php", + "hash": "350444f2cf1491ba2922111814dc1a0d" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Rulesets\/RulesetId\/History\/VersionId.php", + "hash": "96515e82566b8efd7d1a8ff104df85aa" } ] }, diff --git a/clients/GitHub/src/Client.php b/clients/GitHub/src/Client.php index 5ab6e36be5f..31b26e28d99 100644 --- a/clients/GitHub/src/Client.php +++ b/clients/GitHub/src/Client.php @@ -27,7 +27,7 @@ public function __construct(AuthenticationInterface $authentication, Browser $br } // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\NetworkConfiguration|\ApiClients\Client\GitHub\Schema\NetworkSettings|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\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|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\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|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository + public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\RulesetVersion|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\NetworkConfiguration|\ApiClients\Client\GitHub\Schema\NetworkSettings|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\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|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\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|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository { [$method, $path] = explode(' ', $call); $pathChunks = explode('/', $path); diff --git a/clients/GitHub/src/ClientInterface.php b/clients/GitHub/src/ClientInterface.php index fc0aff7ce59..16d0c22e4cd 100644 --- a/clients/GitHub/src/ClientInterface.php +++ b/clients/GitHub/src/ClientInterface.php @@ -7,7 +7,7 @@ interface ClientInterface { // phpcs:disable - public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\NetworkConfiguration|\ApiClients\Client\GitHub\Schema\NetworkSettings|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\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|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\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|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository; + public function call(string $call, array $params = []): \ApiClients\Client\GitHub\Schema\Root|iterable|\ApiClients\Client\GitHub\Schema\GlobalAdvisory|\ApiClients\Client\GitHub\Schema\Integration|\ApiClients\Client\GitHub\Schema\WebhookConfig|\ApiClients\Client\GitHub\Schema\HookDelivery|\ApiClients\Client\GitHub\Schema\Operations\Apps\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|\ApiClients\Client\GitHub\Schema\Installation|\ApiClients\Client\GitHub\Schema\InstallationToken|\ApiClients\Client\GitHub\Schema\Authorization|\ApiClients\Client\GitHub\Schema\ClassroomAssignment|\ApiClients\Client\GitHub\Schema\Classroom|\ApiClients\Client\GitHub\Schema\CodeOfConduct|\ApiClients\Client\GitHub\Schema\Operations\Emojis\Get\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodeSecurityConfiguration|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachEnterpriseConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefaultForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Feed|\ApiClients\Client\GitHub\Schema\GistSimple|\ApiClients\Client\GitHub\Schema\GistComment|\ApiClients\Client\GitHub\Schema\BaseGist|\ApiClients\Client\GitHub\Schema\GitignoreTemplate|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListReposAccessibleToInstallation\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\License|string|\ApiClients\Client\GitHub\Schema\MarketplacePurchase|\ApiClients\Client\GitHub\Schema\ApiOverview|\ApiClients\Client\GitHub\Schema\BasicError|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Thread|\ApiClients\Client\GitHub\Schema\ThreadSubscription|\Psr\Http\Message\ResponseInterface|\ApiClients\Client\GitHub\Schema\BillingUsageReport|\ApiClients\Client\GitHub\Schema\OrganizationFull|\ApiClients\Client\GitHub\Schema\Operations\Orgs\Delete\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersGithubOwnedImagesForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPartnerImagesForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OidcCustomSub|\ApiClients\Client\GitHub\Schema\EmptyObject|\ApiClients\Client\GitHub\Schema\ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\SelectedActions|\ApiClients\Client\GitHub\Schema\ActionsGetDefaultWorkflowPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RunnerGroupsOrg|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GenerateRunnerJitconfigForOrg\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\AuthenticationToken|\ApiClients\Client\GitHub\Schema\Runner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\CodeSecurity\SetConfigurationAsDefault\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInOrganization\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForTeams\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Copilot\CancelCopilotSeatAssignmentForUsers\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotPublicKey|\ApiClients\Client\GitHub\Schema\OrganizationDependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\OrgHook|\ApiClients\Client\GitHub\Schema\Operations\Orgs\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\ApiInsightsSummaryStats|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\InteractionLimitResponse|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForOrg\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\OrganizationInvitation|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteFromOrganization\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Codespace|\ApiClients\Client\GitHub\Schema\CopilotSeatDetails|\ApiClients\Client\GitHub\Schema\OrgMembership|\ApiClients\Client\GitHub\Schema\Migration|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrganizationRole|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ConvertMemberToOutsideCollaborator\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Package|\ApiClients\Client\GitHub\Schema\PackageVersion|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\ListOrgPrivateRegistries\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfigurationWithSelectedRepositories|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHub\Schema\Project|\ApiClients\Client\GitHub\Schema\CustomProperty|\ApiClients\Client\GitHub\Schema\FullRepository|\ApiClients\Client\GitHub\Schema\RepositoryRuleset|\ApiClients\Client\GitHub\Schema\RuleSuite|\ApiClients\Client\GitHub\Schema\RulesetVersion|\ApiClients\Client\GitHub\Schema\ActionsBillingUsage|\ApiClients\Client\GitHub\Schema\PackagesBillingUsage|\ApiClients\Client\GitHub\Schema\CombinedBillingUsage|\ApiClients\Client\GitHub\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\NetworkConfiguration|\ApiClients\Client\GitHub\Schema\NetworkSettings|\ApiClients\Client\GitHub\Schema\TeamFull|\ApiClients\Client\GitHub\Schema\TeamDiscussion|\ApiClients\Client\GitHub\Schema\TeamDiscussionComment|\ApiClients\Client\GitHub\Schema\Reaction|\ApiClients\Client\GitHub\Schema\TeamMembership|\ApiClients\Client\GitHub\Schema\TeamProject|\ApiClients\Client\GitHub\Schema\TeamRepository|\ApiClients\Client\GitHub\Schema\ProjectCard|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectColumn|\ApiClients\Client\GitHub\Schema\Operations\Projects\MoveColumn\Response\ApplicationJson\Created\Application\Json|\ApiClients\Client\GitHub\Schema\ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\RateLimitOverview|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Artifact|\ApiClients\Client\GitHub\Schema\ActionsCacheUsageByRepository|\ApiClients\Client\GitHub\Schema\ActionsCacheList|\ApiClients\Client\GitHub\Schema\Job|\ApiClients\Client\GitHub\Schema\OidcCustomSubRepo|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\ActionsWorkflowAccessToRepository|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\RemoveAllCustomLabelsFromSelfHostedRunnerForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\WorkflowRun|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunArtifacts\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRunAttempt\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsSecret|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ActionsVariable|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Workflow|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\WorkflowUsage|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateAttestation\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Autolink|\ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|\ApiClients\Client\GitHub\Schema\BranchWithProtection|\ApiClients\Client\GitHub\Schema\BranchProtection|\ApiClients\Client\GitHub\Schema\ProtectedBranch|\ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced|\ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview|\ApiClients\Client\GitHub\Schema\StatusCheckPolicy|\ApiClients\Client\GitHub\Schema\BranchRestrictionPolicy|\ApiClients\Client\GitHub\Schema\CheckRun|\ApiClients\Client\GitHub\Schema\CheckSuite|\ApiClients\Client\GitHub\Schema\CheckSuitePreference|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodeScanningAlert|\ApiClients\Client\GitHub\Schema\CodeScanningAutofix|\ApiClients\Client\GitHub\Schema\CodeScanningAutofixCommitsResponse|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningAnalysisDeletion|\ApiClients\Client\GitHub\Schema\CodeScanningCodeqlDatabase|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysis|\ApiClients\Client\GitHub\Schema\CodeScanningVariantAnalysisRepoTask|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetup|\ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsReceipt|\ApiClients\Client\GitHub\Schema\CodeScanningSarifsStatus|\ApiClients\Client\GitHub\Schema\CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHub\Schema\CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\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|\ApiClients\Client\GitHub\Schema\CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\RepoCodespacesSecret|\ApiClients\Client\GitHub\Schema\RepositoryInvitation|\ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\CommitComment|\ApiClients\Client\GitHub\Schema\Commit|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CombinedCommitStatus|\ApiClients\Client\GitHub\Schema\CommunityProfile|\ApiClients\Client\GitHub\Schema\CommitComparison|\ApiClients\Client\GitHub\Schema\ContentDirectory|\ApiClients\Client\GitHub\Schema\ContentFile|\ApiClients\Client\GitHub\Schema\ContentSymlink|\ApiClients\Client\GitHub\Schema\ContentSubmodule|\ApiClients\Client\GitHub\Schema\FileCommit|\ApiClients\Client\GitHub\Schema\DependabotAlert|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DependabotSecret|\ApiClients\Client\GitHub\Schema\DependencyGraphSpdxSbom|\ApiClients\Client\GitHub\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|\ApiClients\Client\GitHub\Schema\Deployment|\ApiClients\Client\GitHub\Schema\Operations\Repos\CreateDeployment\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\DeploymentStatus|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Environment|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\DeploymentProtectionRule|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\ShortBlob|\ApiClients\Client\GitHub\Schema\Blob|\ApiClients\Client\GitHub\Schema\GitCommit|\ApiClients\Client\GitHub\Schema\GitRef|\ApiClients\Client\GitHub\Schema\GitTag|\ApiClients\Client\GitHub\Schema\GitTree|\ApiClients\Client\GitHub\Schema\Hook|\ApiClients\Client\GitHub\Schema\Operations\Repos\RedeliverWebhookDelivery\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Import|\ApiClients\Client\GitHub\Schema\PorterAuthor|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForRepo\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Issue|\ApiClients\Client\GitHub\Schema\IssueComment|\ApiClients\Client\GitHub\Schema\IssueEvent|\ApiClients\Client\GitHub\Schema\DeployKey|\ApiClients\Client\GitHub\Schema\Label|\ApiClients\Client\GitHub\Schema\Language|\ApiClients\Client\GitHub\Schema\LicenseContent|\ApiClients\Client\GitHub\Schema\MergedUpstream|\ApiClients\Client\GitHub\Schema\Milestone|\ApiClients\Client\GitHub\Schema\Operations\Activity\MarkRepoNotificationsAsRead\Response\ApplicationJson\Accepted|\ApiClients\Client\GitHub\Schema\Page|\ApiClients\Client\GitHub\Schema\PageBuildStatus|\ApiClients\Client\GitHub\Schema\PageBuild|\ApiClients\Client\GitHub\Schema\PageDeployment|\ApiClients\Client\GitHub\Schema\PagesDeploymentStatus|\ApiClients\Client\GitHub\Schema\PagesHealthCheck|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PullRequest|\ApiClients\Client\GitHub\Schema\PullRequestReviewComment|\ApiClients\Client\GitHub\Schema\PullRequestMergeResult|\ApiClients\Client\GitHub\Schema\PullRequestReviewRequest|\ApiClients\Client\GitHub\Schema\PullRequestSimple|\ApiClients\Client\GitHub\Schema\PullRequestReview|\ApiClients\Client\GitHub\Schema\Operations\Pulls\UpdateBranch\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Release|\ApiClients\Client\GitHub\Schema\ReleaseAsset|\ApiClients\Client\GitHub\Schema\ReleaseNotesContent|\ApiClients\Client\GitHub\Schema\SecretScanningAlert|\ApiClients\Client\GitHub\Schema\SecretScanningPushProtectionBypass|\ApiClients\Client\GitHub\Schema\SecretScanningScanHistory|\ApiClients\Client\GitHub\Schema\RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\SimpleUser|\ApiClients\Client\GitHub\Schema\Stargazer|\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|\ApiClients\Client\GitHub\Schema\ParticipationStats|\ApiClients\Client\GitHub\Schema\Status|\ApiClients\Client\GitHub\Schema\RepositorySubscription|\ApiClients\Client\GitHub\Schema\TagProtection|\ApiClients\Client\GitHub\Schema\Topic|\ApiClients\Client\GitHub\Schema\CloneTraffic|\ApiClients\Client\GitHub\Schema\ViewTraffic|\ApiClients\Client\GitHub\Schema\MinimalRepository|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\PrivateUser|\ApiClients\Client\GitHub\Schema\PublicUser|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\CodespacesUserPublicKey|\ApiClients\Client\GitHub\Schema\CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\DeleteForAuthenticatedUser\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceExportDetails|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\CodespaceWithFullRepository|\ApiClients\Client\GitHub\Schema\GpgKey|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Interactions\GetRestrictionsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json\One|\ApiClients\Client\GitHub\Schema\Key|\ApiClients\Client\GitHub\Schema\SshSigningKey|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Hovercard|\ApiClients\Client\GitHub\Schema\StarredRepository|\ApiClients\Client\GitHub\Schema\Repository; public function operations(): OperationsInterface; diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Rulesets/RulesetId/History.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Rulesets/RulesetId/History.php new file mode 100644 index 00000000000..2071522eea4 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Rulesets/RulesetId/History.php @@ -0,0 +1,286 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Rulesets/RulesetId/History/VersionId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Rulesets/RulesetId/History/VersionId.php new file mode 100644 index 00000000000..0dcc5dc7434 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/Rulesets/RulesetId/History/VersionId.php @@ -0,0 +1,438 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\RulesetVersion' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion($payload), + 'ApiClients\Client\GitHub\Schema\RulesetVersion\Actor' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($payload), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion(array $payload): RulesetVersion + { + $properties = []; + $missingFields = []; + try { + $value = $payload['version_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'version_id'; + goto after_versionId; + } + + $properties['versionId'] = $value; + + after_versionId: + + $value = $payload['actor'] ?? null; + + if ($value === null) { + $missingFields[] = 'actor'; + goto after_actor; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'actor'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['actor'] = $value; + + after_actor: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'updated_at'; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(RulesetVersion::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new RulesetVersion(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor(array $payload): Actor + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $properties['type'] = null; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion\Actor', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Actor::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Actor(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion\Actor', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\RulesetVersion' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion($object), + 'ApiClients\Client\GitHub\Schema\RulesetVersion\Actor' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion(mixed $object): mixed + { + assert($object instanceof RulesetVersion); + $result = []; + + $versionId = $object->versionId; + after_versionId: $result['version_id'] = $versionId; + + $actor = $object->actor; + $actor = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($actor); + after_actor: $result['actor'] = $actor; + + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor(mixed $object): mixed + { + assert($object instanceof Actor); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $type = $object->type; + + if ($type === null) { + goto after_type; + } + + after_type: $result['type'] = $type; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Rulesets/RulesetId/History.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Rulesets/RulesetId/History.php new file mode 100644 index 00000000000..80babab11ed --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Rulesets/RulesetId/History.php @@ -0,0 +1,286 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Rulesets/RulesetId/History/VersionId.php b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Rulesets/RulesetId/History/VersionId.php new file mode 100644 index 00000000000..993ee7f2231 --- /dev/null +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Rulesets/RulesetId/History/VersionId.php @@ -0,0 +1,438 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHub\Schema\RulesetVersion' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion($payload), + 'ApiClients\Client\GitHub\Schema\RulesetVersion\Actor' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($payload), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion(array $payload): RulesetVersion + { + $properties = []; + $missingFields = []; + try { + $value = $payload['version_id'] ?? null; + + if ($value === null) { + $missingFields[] = 'version_id'; + goto after_versionId; + } + + $properties['versionId'] = $value; + + after_versionId: + + $value = $payload['actor'] ?? null; + + if ($value === null) { + $missingFields[] = 'actor'; + goto after_actor; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'actor'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['actor'] = $value; + + after_actor: + + $value = $payload['updated_at'] ?? null; + + if ($value === null) { + $missingFields[] = 'updated_at'; + goto after_updatedAt; + } + + $properties['updatedAt'] = $value; + + after_updatedAt: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(RulesetVersion::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new RulesetVersion(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor(array $payload): Actor + { + $properties = []; + $missingFields = []; + try { + $value = $payload['id'] ?? null; + + if ($value === null) { + $properties['id'] = null; + goto after_id; + } + + $properties['id'] = $value; + + after_id: + + $value = $payload['type'] ?? null; + + if ($value === null) { + $properties['type'] = null; + goto after_type; + } + + $properties['type'] = $value; + + after_type: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion\Actor', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(Actor::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new Actor(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\RulesetVersion\Actor', $exception, stack: $this->hydrationStack); + } + } + + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHub\Schema\RulesetVersion' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion($object), + 'ApiClients\Client\GitHub\Schema\RulesetVersion\Actor' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($object), + 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion(mixed $object): mixed + { + assert($object instanceof RulesetVersion); + $result = []; + + $versionId = $object->versionId; + after_versionId: $result['version_id'] = $versionId; + + $actor = $object->actor; + $actor = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor($actor); + after_actor: $result['actor'] = $actor; + + $updatedAt = $object->updatedAt; + after_updatedAt: $result['updated_at'] = $updatedAt; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️RulesetVersion⚡️Actor(mixed $object): mixed + { + assert($object instanceof Actor); + $result = []; + + $id = $object->id; + + if ($id === null) { + goto after_id; + } + + after_id: $result['id'] = $id; + + $type = $object->type; + + if ($type === null) { + goto after_type; + } + + after_type: $result['type'] = $type; + + return $result; + } + + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 3a06ed034b2..2f76de6a1e1 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -226,6 +226,8 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org\Rulesets\RuleSuites|null $operation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites = null; private Internal\Hydrator\Operation\Orgs\Org\Rulesets\RuleSuites\RuleSuiteId|null $operation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites🌀RuleSuiteId = null; private Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId|null $operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId = null; + private Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History|null $operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History = null; + private Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History\VersionId|null $operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId = null; private Internal\Hydrator\Operation\Orgs\Org\SecretScanning\Alerts|null $operation🌀Orgs🌀Org🌀SecretScanning🌀Alerts = null; private Internal\Hydrator\Operation\Orgs\Org\SecurityAdvisories|null $operation🌀Orgs🌀Org🌀SecurityAdvisories = null; private Internal\Hydrator\Operation\Orgs\Org\SecurityManagers|null $operation🌀Orgs🌀Org🌀SecurityManagers = null; @@ -532,6 +534,8 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RuleSuites|null $operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RuleSuites = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RuleSuites\RuleSuiteId|null $operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RuleSuites🌀RuleSuiteId = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId|null $operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History|null $operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History = null; + private Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History\VersionId|null $operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts\AlertNumber|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber = null; private Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts\AlertNumber\Locations|null $operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts🌀AlertNumber🌀Locations = null; @@ -867,6 +871,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\LicenseSimple', '\\ApiClients\\Client\\GitHub\\Schema\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeOfConductSimple', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\CustomProperties' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Repos()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Self_', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Html' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\RuleSuite' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites🌀RuleSuiteId()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\RulesetVersion', '\\ApiClients\\Client\\GitHub\\Schema\\RulesetVersion\\Actor' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsBillingUsage', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsBillingUsage\\MinutesUsedBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing🌀Actions()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\PackagesBillingUsage' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing🌀Packages()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\CombinedBillingUsage' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing🌀SharedStorage()->hydrateObject($className, $payload), @@ -1244,6 +1249,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\Repository', '\\ApiClients\\Client\\GitHub\\Schema\\LicenseSimple', '\\ApiClients\\Client\\GitHub\\Schema\\Repository\\Permissions', '\\ApiClients\\Client\\GitHub\\Schema\\CodeOfConductSimple', '\\ApiClients\\Client\\GitHub\\Schema\\FullRepository\\CustomProperties' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Repos()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Self_', '\\ApiClients\\Client\\GitHub\\Schema\\RepositoryRuleset\\Links\\Html' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\RuleSuite' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites🌀RuleSuiteId()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\RulesetVersion', '\\ApiClients\\Client\\GitHub\\Schema\\RulesetVersion\\Actor' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\ActionsBillingUsage', '\\ApiClients\\Client\\GitHub\\Schema\\ActionsBillingUsage\\MinutesUsedBreakdown' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing🌀Actions()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\PackagesBillingUsage' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing🌀Packages()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\CombinedBillingUsage' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Settings🌀Billing🌀SharedStorage()->serializeObject($object), @@ -3443,6 +3449,24 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId return $this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId; } + public function getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History(): Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History + { + if ($this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History instanceof Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History === false) { + $this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History = new Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History(); + } + + return $this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History; + } + + public function getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId(): Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History\VersionId + { + if ($this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId instanceof Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History\VersionId === false) { + $this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId = new Internal\Hydrator\Operation\Orgs\Org\Rulesets\RulesetId\History\VersionId(); + } + + return $this->operation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId; + } + public function getObjectMapperOperation🌀Orgs🌀Org🌀SecretScanning🌀Alerts(): Internal\Hydrator\Operation\Orgs\Org\SecretScanning\Alerts { if ($this->operation🌀Orgs🌀Org🌀SecretScanning🌀Alerts instanceof Internal\Hydrator\Operation\Orgs\Org\SecretScanning\Alerts === false) { @@ -6197,6 +6221,24 @@ public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets return $this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId; } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History(): Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History = new Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History; + } + + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId(): Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History\VersionId + { + if ($this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History\VersionId === false) { + $this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId = new Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets\RulesetId\History\VersionId(); + } + + return $this->operation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId; + } + public function getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts(): Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts { if ($this->operation🌀Repos🌀Owner🌀Repo🌀SecretScanning🌀Alerts instanceof Internal\Hydrator\Operation\Repos\Owner\Repo\SecretScanning\Alerts === false) { diff --git a/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetHistory.php b/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetHistory.php new file mode 100644 index 00000000000..3eeeba9c440 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetHistory.php @@ -0,0 +1,99 @@ +org = $org; + $this->rulesetId = $rulesetId; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{ruleset_id}', '{per_page}', '{page}'], [$this->org, $this->rulesetId, $this->perPage, $this->page], '/orgs/{org}/rulesets/{ruleset_id}/history' . '?per_page={per_page}&page={page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RulesetVersion { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RulesetVersion::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\RulesetVersion::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetHistoryListing.php b/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetHistoryListing.php new file mode 100644 index 00000000000..d057d14c018 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetHistoryListing.php @@ -0,0 +1,99 @@ +org = $org; + $this->rulesetId = $rulesetId; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{ruleset_id}', '{per_page}', '{page}'], [$this->org, $this->rulesetId, $this->perPage, $this->page], '/orgs/{org}/rulesets/{ruleset_id}/history' . '?per_page={per_page}&page={page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RulesetVersion { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RulesetVersion::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\RulesetVersion::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetVersion.php b/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetVersion.php new file mode 100644 index 00000000000..bff45ff8b81 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Orgs/GetOrgRulesetVersion.php @@ -0,0 +1,82 @@ +org = $org; + $this->rulesetId = $rulesetId; + $this->versionId = $versionId; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{org}', '{ruleset_id}', '{version_id}'], [$this->org, $this->rulesetId, $this->versionId], '/orgs/{org}/rulesets/{ruleset_id}/history/{version_id}')); + } + + public function createResponse(ResponseInterface $response): Schema\RulesetVersion + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RulesetVersion::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\RulesetVersion::class, $body); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetHistory.php b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetHistory.php new file mode 100644 index 00000000000..f6470ad8651 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetHistory.php @@ -0,0 +1,102 @@ +owner = $owner; + $this->repo = $repo; + $this->rulesetId = $rulesetId; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{ruleset_id}', '{per_page}', '{page}'], [$this->owner, $this->repo, $this->rulesetId, $this->perPage, $this->page], '/repos/{owner}/{repo}/rulesets/{ruleset_id}/history' . '?per_page={per_page}&page={page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RulesetVersion { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RulesetVersion::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\RulesetVersion::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetHistoryListing.php b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetHistoryListing.php new file mode 100644 index 00000000000..017d834a72d --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetHistoryListing.php @@ -0,0 +1,102 @@ +owner = $owner; + $this->repo = $repo; + $this->rulesetId = $rulesetId; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{ruleset_id}', '{per_page}', '{page}'], [$this->owner, $this->repo, $this->rulesetId, $this->perPage, $this->page], '/repos/{owner}/{repo}/rulesets/{ruleset_id}/history' . '?per_page={per_page}&page={page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RulesetVersion { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RulesetVersion::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\RulesetVersion::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetVersion.php b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetVersion.php new file mode 100644 index 00000000000..3dab66079d0 --- /dev/null +++ b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRulesetVersion.php @@ -0,0 +1,85 @@ +owner = $owner; + $this->repo = $repo; + $this->rulesetId = $rulesetId; + $this->versionId = $versionId; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{owner}', '{repo}', '{ruleset_id}', '{version_id}'], [$this->owner, $this->repo, $this->rulesetId, $this->versionId], '/repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}')); + } + + public function createResponse(ResponseInterface $response): Schema\RulesetVersion + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RulesetVersion::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + return $this->hydrator->hydrateObject(Schema\RulesetVersion::class, $body); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetHistory.php b/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetHistory.php new file mode 100644 index 00000000000..9c79e5070e3 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetHistory.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, int $rulesetId, int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\GetOrgRulesetHistory($this->responseSchemaValidator, $this->hydrator, $org, $rulesetId, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetHistoryListing.php b/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetHistoryListing.php new file mode 100644 index 00000000000..713fa48c327 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetHistoryListing.php @@ -0,0 +1,41 @@ + */ + public function call(string $org, int $rulesetId, int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\GetOrgRulesetHistoryListing($this->responseSchemaValidator, $this->hydrator, $org, $rulesetId, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetVersion.php b/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetVersion.php new file mode 100644 index 00000000000..133695990e3 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Orgs/GetOrgRulesetVersion.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $org, $rulesetId, $versionId); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): RulesetVersion { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetHistory.php b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetHistory.php new file mode 100644 index 00000000000..c3777318a97 --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetHistory.php @@ -0,0 +1,41 @@ + */ + public function call(string $owner, string $repo, int $rulesetId, int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetRepoRulesetHistory($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $rulesetId, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetHistoryListing.php b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetHistoryListing.php new file mode 100644 index 00000000000..b22f9b4a78a --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetHistoryListing.php @@ -0,0 +1,41 @@ + */ + public function call(string $owner, string $repo, int $rulesetId, int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetRepoRulesetHistoryListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $rulesetId, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetVersion.php b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetVersion.php new file mode 100644 index 00000000000..1aad4d4954b --- /dev/null +++ b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRulesetVersion.php @@ -0,0 +1,40 @@ +responseSchemaValidator, $this->hydrator, $owner, $repo, $rulesetId, $versionId); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): RulesetVersion { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHub/src/Internal/Operators.php b/clients/GitHub/src/Internal/Operators.php index 1df8c255533..b378b3e7b8e 100644 --- a/clients/GitHub/src/Internal/Operators.php +++ b/clients/GitHub/src/Internal/Operators.php @@ -380,6 +380,9 @@ final class Operators private Internal\Operator\Repos\GetOrgRuleset|null $repos👷GetOrgRuleset = null; private Internal\Operator\Repos\UpdateOrgRuleset|null $repos👷UpdateOrgRuleset = null; private Internal\Operator\Repos\DeleteOrgRuleset|null $repos👷DeleteOrgRuleset = null; + private Internal\Operator\Orgs\GetOrgRulesetHistory|null $orgs👷GetOrgRulesetHistory = null; + private Internal\Operator\Orgs\GetOrgRulesetHistoryListing|null $orgs👷GetOrgRulesetHistoryListing = null; + private Internal\Operator\Orgs\GetOrgRulesetVersion|null $orgs👷GetOrgRulesetVersion = null; private Internal\Operator\SecretScanning\ListAlertsForOrg|null $secretScanning👷ListAlertsForOrg = null; private Internal\Operator\SecretScanning\ListAlertsForOrgListing|null $secretScanning👷ListAlertsForOrgListing = null; private Internal\Operator\SecurityAdvisories\ListOrgRepositoryAdvisories|null $securityAdvisories👷ListOrgRepositoryAdvisories = null; @@ -935,6 +938,9 @@ final class Operators private Internal\Operator\Repos\GetRepoRuleset|null $repos👷GetRepoRuleset = null; private Internal\Operator\Repos\UpdateRepoRuleset|null $repos👷UpdateRepoRuleset = null; private Internal\Operator\Repos\DeleteRepoRuleset|null $repos👷DeleteRepoRuleset = null; + private Internal\Operator\Repos\GetRepoRulesetHistory|null $repos👷GetRepoRulesetHistory = null; + private Internal\Operator\Repos\GetRepoRulesetHistoryListing|null $repos👷GetRepoRulesetHistoryListing = null; + private Internal\Operator\Repos\GetRepoRulesetVersion|null $repos👷GetRepoRulesetVersion = null; private Internal\Operator\SecretScanning\ListAlertsForRepo|null $secretScanning👷ListAlertsForRepo = null; private Internal\Operator\SecretScanning\ListAlertsForRepoListing|null $secretScanning👷ListAlertsForRepoListing = null; private Internal\Operator\SecretScanning\GetAlert|null $secretScanning👷GetAlert = null; @@ -4532,6 +4538,33 @@ public function repos👷DeleteOrgRuleset(): Internal\Operator\Repos\DeleteOrgRu return $this->repos👷DeleteOrgRuleset; } + public function orgs👷GetOrgRulesetHistory(): Internal\Operator\Orgs\GetOrgRulesetHistory + { + if ($this->orgs👷GetOrgRulesetHistory instanceof Internal\Operator\Orgs\GetOrgRulesetHistory === false) { + $this->orgs👷GetOrgRulesetHistory = new Internal\Operator\Orgs\GetOrgRulesetHistory($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History()); + } + + return $this->orgs👷GetOrgRulesetHistory; + } + + public function orgs👷GetOrgRulesetHistoryListing(): Internal\Operator\Orgs\GetOrgRulesetHistoryListing + { + if ($this->orgs👷GetOrgRulesetHistoryListing instanceof Internal\Operator\Orgs\GetOrgRulesetHistoryListing === false) { + $this->orgs👷GetOrgRulesetHistoryListing = new Internal\Operator\Orgs\GetOrgRulesetHistoryListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History()); + } + + return $this->orgs👷GetOrgRulesetHistoryListing; + } + + public function orgs👷GetOrgRulesetVersion(): Internal\Operator\Orgs\GetOrgRulesetVersion + { + if ($this->orgs👷GetOrgRulesetVersion instanceof Internal\Operator\Orgs\GetOrgRulesetVersion === false) { + $this->orgs👷GetOrgRulesetVersion = new Internal\Operator\Orgs\GetOrgRulesetVersion($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId()); + } + + return $this->orgs👷GetOrgRulesetVersion; + } + public function secretScanning👷ListAlertsForOrg(): Internal\Operator\SecretScanning\ListAlertsForOrg { if ($this->secretScanning👷ListAlertsForOrg instanceof Internal\Operator\SecretScanning\ListAlertsForOrg === false) { @@ -9527,6 +9560,33 @@ public function repos👷DeleteRepoRuleset(): Internal\Operator\Repos\DeleteRepo return $this->repos👷DeleteRepoRuleset; } + public function repos👷GetRepoRulesetHistory(): Internal\Operator\Repos\GetRepoRulesetHistory + { + if ($this->repos👷GetRepoRulesetHistory instanceof Internal\Operator\Repos\GetRepoRulesetHistory === false) { + $this->repos👷GetRepoRulesetHistory = new Internal\Operator\Repos\GetRepoRulesetHistory($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History()); + } + + return $this->repos👷GetRepoRulesetHistory; + } + + public function repos👷GetRepoRulesetHistoryListing(): Internal\Operator\Repos\GetRepoRulesetHistoryListing + { + if ($this->repos👷GetRepoRulesetHistoryListing instanceof Internal\Operator\Repos\GetRepoRulesetHistoryListing === false) { + $this->repos👷GetRepoRulesetHistoryListing = new Internal\Operator\Repos\GetRepoRulesetHistoryListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History()); + } + + return $this->repos👷GetRepoRulesetHistoryListing; + } + + public function repos👷GetRepoRulesetVersion(): Internal\Operator\Repos\GetRepoRulesetVersion + { + if ($this->repos👷GetRepoRulesetVersion instanceof Internal\Operator\Repos\GetRepoRulesetVersion === false) { + $this->repos👷GetRepoRulesetVersion = new Internal\Operator\Repos\GetRepoRulesetVersion($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId()); + } + + return $this->repos👷GetRepoRulesetVersion; + } + public function secretScanning👷ListAlertsForRepo(): Internal\Operator\SecretScanning\ListAlertsForRepo { if ($this->secretScanning👷ListAlertsForRepo instanceof Internal\Operator\SecretScanning\ListAlertsForRepo === false) { diff --git a/clients/GitHub/src/Internal/Router/Get/Eight.php b/clients/GitHub/src/Internal/Router/Get/Eight.php index 9c65153eaab..442fde936c1 100644 --- a/clients/GitHub/src/Internal/Router/Get/Eight.php +++ b/clients/GitHub/src/Internal/Router/Get/Eight.php @@ -24,6 +24,7 @@ use ApiClients\Client\GitHub\Schema\ProtectedBranchAdminEnforced; use ApiClients\Client\GitHub\Schema\ProtectedBranchPullRequestReview; use ApiClients\Client\GitHub\Schema\PullRequestReview; +use ApiClients\Client\GitHub\Schema\RulesetVersion; use ApiClients\Client\GitHub\Schema\StatusCheckPolicy; use ApiClients\Client\GitHub\Schema\TeamRepository; use ApiClients\Client\GitHub\Schema\WorkflowRunUsage; @@ -37,8 +38,8 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody */ - public function call(string $call, array $params, array $pathChunks): iterable|ApiInsightsSummaryStats|PackageVersion|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningAutofix|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview + /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Schema\RulesetVersion|Observable|WithoutBody */ + public function call(string $call, array $params, array $pathChunks): iterable|ApiInsightsSummaryStats|PackageVersion|TeamRepository|WithoutBody|OidcCustomSubRepo|Ok|Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListJobsForWorkflowRun\Response\ApplicationJson\Ok\Application\Json|WorkflowRunUsage|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRuns\Response\ApplicationJson\Ok\Application\Json|WorkflowUsage|ProtectedBranchAdminEnforced|ProtectedBranchPullRequestReview|StatusCheckPolicy|BranchRestrictionPolicy|CodeScanningAutofix|CodeScanningCodeqlDatabase|CodeScanningVariantAnalysis|DeploymentStatus|DeploymentBranchPolicy|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListCustomDeploymentRuleIntegrations\Response\ApplicationJson\Ok|DeploymentProtectionRule|ActionsPublicKey|ActionsSecret|ActionsVariable|HookDelivery|PullRequestReview|RulesetVersion { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'orgs') { @@ -344,6 +345,16 @@ public function call(string $call, array $params, array $pathChunks): iterable|A } } } + } elseif ($pathChunks[4] === 'rulesets') { + if ($pathChunks[5] === '{ruleset_id}') { + if ($pathChunks[6] === 'history') { + if ($pathChunks[7] === '{version_id}') { + if ($call === 'GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}') { + return $this->routers->internal🔀Router🔀Get🔀Repos()->getRepoRulesetVersion($params); + } + } + } + } } elseif ($pathChunks[4] === 'secret-scanning') { if ($pathChunks[5] === 'alerts') { if ($pathChunks[6] === '{alert_number}') { diff --git a/clients/GitHub/src/Internal/Router/Get/Orgs.php b/clients/GitHub/src/Internal/Router/Get/Orgs.php index d076190d35a..266ef0406ce 100644 --- a/clients/GitHub/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Get/Orgs.php @@ -13,6 +13,7 @@ use ApiClients\Client\GitHub\Schema\OrganizationRole; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\OrgMembership; +use ApiClients\Client\GitHub\Schema\RulesetVersion; use ApiClients\Client\GitHub\Schema\WebhookConfig; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -1021,6 +1022,39 @@ public function getCustomProperty(array $params): CustomProperty return $operator->call($arguments['org'], $arguments['custom_property_name']); } + /** @return iterable */ + public function getOrgRulesetHistory(array $params): iterable + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('ruleset_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ruleset_id'); + } + + $arguments['ruleset_id'] = $params['ruleset_id']; + unset($params['ruleset_id']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\Orgs\GetOrgRulesetHistory($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History()); + + return $operator->call($arguments['org'], $arguments['ruleset_id'], $arguments['per_page'], $arguments['page']); + } + /** @return */ public function getWebhookDelivery(array $params): HookDelivery { @@ -1047,4 +1081,30 @@ public function getWebhookDelivery(array $params): HookDelivery return $operator->call($arguments['org'], $arguments['hook_id'], $arguments['delivery_id']); } + + public function getOrgRulesetVersion(array $params): RulesetVersion + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('ruleset_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ruleset_id'); + } + + $arguments['ruleset_id'] = $params['ruleset_id']; + unset($params['ruleset_id']); + if (array_key_exists('version_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: version_id'); + } + + $arguments['version_id'] = $params['version_id']; + unset($params['version_id']); + $operator = new Internal\Operator\Orgs\GetOrgRulesetVersion($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History🌀VersionId()); + + return $operator->call($arguments['org'], $arguments['ruleset_id'], $arguments['version_id']); + } } diff --git a/clients/GitHub/src/Internal/Router/Get/Repos.php b/clients/GitHub/src/Internal/Router/Get/Repos.php index f30529c7a7e..ff618e61c10 100644 --- a/clients/GitHub/src/Internal/Router/Get/Repos.php +++ b/clients/GitHub/src/Internal/Router/Get/Repos.php @@ -47,6 +47,7 @@ use ApiClients\Client\GitHub\Schema\ReleaseAsset; use ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission; use ApiClients\Client\GitHub\Schema\RepositoryRuleset; +use ApiClients\Client\GitHub\Schema\RulesetVersion; use ApiClients\Client\GitHub\Schema\RuleSuite; use ApiClients\Client\GitHub\Schema\StatusCheckPolicy; use ApiClients\Client\GitHub\Schema\Topic; @@ -2802,6 +2803,45 @@ public function getRepoRuleSuite(array $params): RuleSuite return $operator->call($arguments['owner'], $arguments['repo'], $arguments['rule_suite_id']); } + /** @return iterable */ + public function getRepoRulesetHistory(array $params): iterable + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('ruleset_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ruleset_id'); + } + + $arguments['ruleset_id'] = $params['ruleset_id']; + unset($params['ruleset_id']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\Repos\GetRepoRulesetHistory($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['ruleset_id'], $arguments['per_page'], $arguments['page']); + } + /** @return Observable */ public function getTopPaths(array $params): iterable { @@ -3150,6 +3190,38 @@ public function getWebhookDelivery(array $params): HookDelivery return $operator->call($arguments['owner'], $arguments['repo'], $arguments['hook_id'], $arguments['delivery_id']); } + public function getRepoRulesetVersion(array $params): RulesetVersion + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('ruleset_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ruleset_id'); + } + + $arguments['ruleset_id'] = $params['ruleset_id']; + unset($params['ruleset_id']); + if (array_key_exists('version_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: version_id'); + } + + $arguments['version_id'] = $params['version_id']; + unset($params['version_id']); + $operator = new Internal\Operator\Repos\GetRepoRulesetVersion($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History🌀VersionId()); + + return $operator->call($arguments['owner'], $arguments['repo'], $arguments['ruleset_id'], $arguments['version_id']); + } + /** @return Observable */ public function getAllStatusCheckContexts(array $params): iterable { diff --git a/clients/GitHub/src/Internal/Router/Get/Seven.php b/clients/GitHub/src/Internal/Router/Get/Seven.php index 44db2874ac7..0079fc4b427 100644 --- a/clients/GitHub/src/Internal/Router/Get/Seven.php +++ b/clients/GitHub/src/Internal/Router/Get/Seven.php @@ -43,6 +43,7 @@ use ApiClients\Client\GitHub\Schema\ReleaseAsset; use ApiClients\Client\GitHub\Schema\RepoCodespacesSecret; use ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission; +use ApiClients\Client\GitHub\Schema\RulesetVersion; use ApiClients\Client\GitHub\Schema\RuleSuite; use ApiClients\Client\GitHub\Schema\Runner; use ApiClients\Client\GitHub\Schema\SecretScanningAlert; @@ -63,8 +64,8 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ - public function call(string $call, array $params, array $pathChunks): iterable|Ok|Json|OidcCustomSub|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|TeamDiscussionComment|PackageVersion + /** @return Observable||Observable|Observable|Schema\RulesetVersion|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable */ + public function call(string $call, array $params, array $pathChunks): iterable|Ok|Json|OidcCustomSub|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|RulesetVersion|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { @@ -205,6 +206,16 @@ public function call(string $call, array $params, array $pathChunks): iterable|O } } } + } elseif ($pathChunks[3] === 'rulesets') { + if ($pathChunks[4] === '{ruleset_id}') { + if ($pathChunks[5] === 'history') { + if ($pathChunks[6] === '{version_id}') { + if ($call === 'GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}') { + return $this->routers->internal🔀Router🔀Get🔀Orgs()->getOrgRulesetVersion($params); + } + } + } + } } elseif ($pathChunks[3] === 'team') { if ($pathChunks[4] === '{team_slug}') { if ($pathChunks[5] === 'copilot') { @@ -673,6 +684,12 @@ public function call(string $call, array $params, array $pathChunks): iterable|O return $this->routers->internal🔀Router🔀Get🔀Repos()->getRepoRuleSuite($params); } } + } elseif ($pathChunks[5] === '{ruleset_id}') { + if ($pathChunks[6] === 'history') { + if ($call === 'GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history') { + return $this->routers->internal🔀Router🔀Get🔀Repos()->getRepoRulesetHistory($params); + } + } } } elseif ($pathChunks[4] === 'secret-scanning') { if ($pathChunks[5] === 'alerts') { diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index b7cd2b4936e..ba9a4b3506c 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|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|iterable|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] === '') { @@ -359,6 +359,12 @@ public function call(string $call, array $params, array $pathChunks): iterable|C return $this->routers->internal🔀Router🔀Get🔀Repos()->getOrgRuleSuite($params); } } + } elseif ($pathChunks[4] === '{ruleset_id}') { + if ($pathChunks[5] === 'history') { + if ($call === 'GET /orgs/{org}/rulesets/{ruleset_id}/history') { + return $this->routers->internal🔀Router🔀Get🔀Orgs()->getOrgRulesetHistory($params); + } + } } } elseif ($pathChunks[3] === 'settings') { if ($pathChunks[4] === 'billing') { diff --git a/clients/GitHub/src/Internal/Router/List/Orgs.php b/clients/GitHub/src/Internal/Router/List/Orgs.php index a7c8a3d9690..a4be2b2720b 100644 --- a/clients/GitHub/src/Internal/Router/List/Orgs.php +++ b/clients/GitHub/src/Internal/Router/List/Orgs.php @@ -758,4 +758,43 @@ public function listPatGrantRepositoriesListing(array $params): iterable $arguments['page']++; } while (count($items) > 0); } + + /** @return iterable */ + public function getOrgRulesetHistoryListing(array $params): iterable + { + $arguments = []; + if (array_key_exists('org', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: org'); + } + + $arguments['org'] = $params['org']; + unset($params['org']); + if (array_key_exists('ruleset_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ruleset_id'); + } + + $arguments['ruleset_id'] = $params['ruleset_id']; + unset($params['ruleset_id']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $arguments['page'] = 1; + do { + $operator = new Internal\Operator\Orgs\GetOrgRulesetHistoryListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RulesetId🌀History()); + $items = [...$operator->call($arguments['org'], $arguments['ruleset_id'], $arguments['per_page'], $arguments['page'])]; + + yield from $items; + + $arguments['page']++; + } while (count($items) > 0); + } } diff --git a/clients/GitHub/src/Internal/Router/List/Repos.php b/clients/GitHub/src/Internal/Router/List/Repos.php index 14515d32bd5..544e998eb3f 100644 --- a/clients/GitHub/src/Internal/Router/List/Repos.php +++ b/clients/GitHub/src/Internal/Router/List/Repos.php @@ -1341,4 +1341,49 @@ public function getBranchRulesListing(array $params): iterable $arguments['page']++; } while (count($items) > 0); } + + /** @return iterable */ + public function getRepoRulesetHistoryListing(array $params): iterable + { + $arguments = []; + if (array_key_exists('owner', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: owner'); + } + + $arguments['owner'] = $params['owner']; + unset($params['owner']); + if (array_key_exists('repo', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: repo'); + } + + $arguments['repo'] = $params['repo']; + unset($params['repo']); + if (array_key_exists('ruleset_id', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ruleset_id'); + } + + $arguments['ruleset_id'] = $params['ruleset_id']; + unset($params['ruleset_id']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $arguments['page'] = 1; + do { + $operator = new Internal\Operator\Repos\GetRepoRulesetHistoryListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Repos🌀Owner🌀Repo🌀Rulesets🌀RulesetId🌀History()); + $items = [...$operator->call($arguments['owner'], $arguments['repo'], $arguments['ruleset_id'], $arguments['per_page'], $arguments['page'])]; + + yield from $items; + + $arguments['page']++; + } while (count($items) > 0); + } } diff --git a/clients/GitHub/src/Internal/Router/List/Seven.php b/clients/GitHub/src/Internal/Router/List/Seven.php index c5d0c22f8bb..dd3fb2c9071 100644 --- a/clients/GitHub/src/Internal/Router/List/Seven.php +++ b/clients/GitHub/src/Internal/Router/List/Seven.php @@ -14,7 +14,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|iterable */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError { if ($pathChunks[0] === '') { @@ -177,6 +177,14 @@ public function call(string $call, array $params, array $pathChunks): iterable|B } } } + } elseif ($pathChunks[4] === 'rulesets') { + if ($pathChunks[5] === '{ruleset_id}') { + if ($pathChunks[6] === 'history') { + if ($call === 'LIST /repos/{owner}/{repo}/rulesets/{ruleset_id}/history') { + return $this->routers->internal🔀Router🔀List🔀Repos()->getRepoRulesetHistoryListing($params); + } + } + } } } } diff --git a/clients/GitHub/src/Internal/Router/List/Six.php b/clients/GitHub/src/Internal/Router/List/Six.php index 15771a2e3fb..574246accf7 100644 --- a/clients/GitHub/src/Internal/Router/List/Six.php +++ b/clients/GitHub/src/Internal/Router/List/Six.php @@ -15,7 +15,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { @@ -85,6 +85,14 @@ public function call(string $call, array $params, array $pathChunks): iterable|W } } } + } elseif ($pathChunks[3] === 'rulesets') { + if ($pathChunks[4] === '{ruleset_id}') { + if ($pathChunks[5] === 'history') { + if ($call === 'LIST /orgs/{org}/rulesets/{ruleset_id}/history') { + return $this->routers->internal🔀Router🔀List🔀Orgs()->getOrgRulesetHistoryListing($params); + } + } + } } elseif ($pathChunks[3] === 'teams') { if ($pathChunks[4] === '{team_slug}') { if ($pathChunks[5] === 'discussions') { diff --git a/clients/GitHub/src/Operation/Orgs.php b/clients/GitHub/src/Operation/Orgs.php index b525b619030..dd7957c52a1 100644 --- a/clients/GitHub/src/Operation/Orgs.php +++ b/clients/GitHub/src/Operation/Orgs.php @@ -15,6 +15,7 @@ use ApiClients\Client\GitHub\Schema\OrganizationRole; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\OrgMembership; +use ApiClients\Client\GitHub\Schema\RulesetVersion; use ApiClients\Client\GitHub\Schema\WebhookConfig; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -498,6 +499,23 @@ public function removePublicMembershipForAuthenticatedUser(string $org, string $ return $this->operators->orgs👷RemovePublicMembershipForAuthenticatedUser()->call($org, $username); } + /** @return iterable */ + public function getOrgRulesetHistory(string $org, int $rulesetId, int $perPage, int $page): iterable + { + return $this->operators->orgs👷GetOrgRulesetHistory()->call($org, $rulesetId, $perPage, $page); + } + + /** @return iterable */ + public function getOrgRulesetHistoryListing(string $org, int $rulesetId, int $perPage, int $page): iterable + { + return $this->operators->orgs👷GetOrgRulesetHistoryListing()->call($org, $rulesetId, $perPage, $page); + } + + public function getOrgRulesetVersion(string $org, int $rulesetId, int $versionId): RulesetVersion + { + return $this->operators->orgs👷GetOrgRulesetVersion()->call($org, $rulesetId, $versionId); + } + /** @return Observable */ public function listSecurityManagerTeams(string $org): iterable { diff --git a/clients/GitHub/src/Operation/Repos.php b/clients/GitHub/src/Operation/Repos.php index 00083046fd2..145057aecdb 100644 --- a/clients/GitHub/src/Operation/Repos.php +++ b/clients/GitHub/src/Operation/Repos.php @@ -56,6 +56,7 @@ use ApiClients\Client\GitHub\Schema\RepositoryCollaboratorPermission; use ApiClients\Client\GitHub\Schema\RepositoryInvitation; use ApiClients\Client\GitHub\Schema\RepositoryRuleset; +use ApiClients\Client\GitHub\Schema\RulesetVersion; use ApiClients\Client\GitHub\Schema\RuleSuite; use ApiClients\Client\GitHub\Schema\Status; use ApiClients\Client\GitHub\Schema\StatusCheckPolicy; @@ -1217,6 +1218,23 @@ public function deleteRepoRuleset(string $owner, string $repo, int $rulesetId): return $this->operators->repos👷DeleteRepoRuleset()->call($owner, $repo, $rulesetId); } + /** @return iterable */ + public function getRepoRulesetHistory(string $owner, string $repo, int $rulesetId, int $perPage, int $page): iterable + { + return $this->operators->repos👷GetRepoRulesetHistory()->call($owner, $repo, $rulesetId, $perPage, $page); + } + + /** @return iterable */ + public function getRepoRulesetHistoryListing(string $owner, string $repo, int $rulesetId, int $perPage, int $page): iterable + { + return $this->operators->repos👷GetRepoRulesetHistoryListing()->call($owner, $repo, $rulesetId, $perPage, $page); + } + + public function getRepoRulesetVersion(string $owner, string $repo, int $rulesetId, int $versionId): RulesetVersion + { + return $this->operators->repos👷GetRepoRulesetVersion()->call($owner, $repo, $rulesetId, $versionId); + } + /** @return Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|WithoutBody */ public function getCodeFrequencyStats(string $owner, string $repo): iterable|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|WithoutBody { diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 71582273155..750197c9611 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -1519,6 +1519,18 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /orgs/{org}/rulesets/{ruleset_id}/history') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'LIST /orgs/{org}/rulesets/{ruleset_id}/history') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}') { + return $this->typeResolver->resolve('Schema\\RulesetVersion'); + } + if ($call === 'GET /orgs/{org}/secret-scanning/alerts') { return $this->typeResolver->resolve('Observable'); } @@ -3739,6 +3751,18 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'LIST /repos/{owner}/{repo}/rulesets/{ruleset_id}/history') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}') { + return $this->typeResolver->resolve('Schema\\RulesetVersion'); + } + if ($call === 'GET /repos/{owner}/{repo}/secret-scanning/alerts') { return $this->typeResolver->resolve('Observable|WithoutBody'); } diff --git a/clients/GitHub/src/Schema/RulesetVersion.php b/clients/GitHub/src/Schema/RulesetVersion.php new file mode 100644 index 00000000000..a7ff948773f --- /dev/null +++ b/clients/GitHub/src/Schema/RulesetVersion.php @@ -0,0 +1,64 @@ + '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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetHistoryListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetHistoryListing('generated', 10, 8, 1); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetHistoryListing::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetHistoryListing('generated', 10, 8, 1); + foreach ($result as $item) { + } + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Orgs/GetOrgRulesetHistoryTest.php b/clients/GitHub/tests/Internal/Operation/Orgs/GetOrgRulesetHistoryTest.php new file mode 100644 index 00000000000..a4f41d72fc2 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Orgs/GetOrgRulesetHistoryTest.php @@ -0,0 +1,97 @@ + '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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetHistory::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetHistory('generated', 10, 8, 1); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetHistory::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/orgs/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetHistory('generated', 10, 8, 1); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Orgs/GetOrgRulesetVersionTest.php b/clients/GitHub/tests/Internal/Operation/Orgs/GetOrgRulesetVersionTest.php new file mode 100644 index 00000000000..d7a6c73afee --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Orgs/GetOrgRulesetVersionTest.php @@ -0,0 +1,129 @@ + 'application/json'], json_encode(json_decode(Schema\RulesetVersion::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('GET', '/orgs/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetVersion::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['version_id'] = 10; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\RulesetVersion::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('GET', '/orgs/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetVersion('generated', 10, 10); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/orgs/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetVersion::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['version_id'] = 10; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/orgs/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetVersion('generated', 10, 10); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/orgs/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Orgs\GetOrgRulesetVersion::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + $data['ruleset_id'] = 10; + $data['version_id'] = 10; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/orgs/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->orgs()->getOrgRulesetVersion('generated', 10, 10); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetHistoryListingTest.php b/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetHistoryListingTest.php new file mode 100644 index 00000000000..07db4794871 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetHistoryListingTest.php @@ -0,0 +1,107 @@ + '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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetHistoryListing::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetHistoryListing('generated', 'generated', 10, 8, 1); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetHistoryListing::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetHistoryListing('generated', 'generated', 10, 8, 1); + foreach ($result as $item) { + } + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetHistoryTest.php b/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetHistoryTest.php new file mode 100644 index 00000000000..f27b7c17299 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetHistoryTest.php @@ -0,0 +1,99 @@ + '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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetHistory::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetHistory('generated', 'generated', 10, 8, 1); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetHistory::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/repos/generated/generated/rulesets/10/history?per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetHistory('generated', 'generated', 10, 8, 1); + } +} diff --git a/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetVersionTest.php b/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetVersionTest.php new file mode 100644 index 00000000000..d3b551961b6 --- /dev/null +++ b/clients/GitHub/tests/Internal/Operation/Repos/GetRepoRulesetVersionTest.php @@ -0,0 +1,132 @@ + 'application/json'], json_encode(json_decode(Schema\RulesetVersion::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('GET', '/repos/generated/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetVersion::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['version_id'] = 10; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_200_responseContentType_application_json_zero(): void + { + $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\RulesetVersion::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('GET', '/repos/generated/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetVersion('generated', 'generated', 10, 10); + } + + /** @test */ + public function call_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/repos/generated/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetVersion::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['version_id'] = 10; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['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('GET', '/repos/generated/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetVersion('generated', 'generated', 10, 10); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/repos/generated/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Repos\GetRepoRulesetVersion::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + $data['ruleset_id'] = 10; + $data['version_id'] = 10; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['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('GET', '/repos/generated/generated/rulesets/10/history/10', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->repos()->getRepoRulesetVersion('generated', 'generated', 10, 10); + } +} diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 4f3995fc2d4..fd98f8a3f97 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -386,6 +386,9 @@ function authHeader(): string assertType('', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('DELETE /orgs/{org}/rulesets/{ruleset_id}')); +assertType('iterable', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}/history')); +assertType('iterable', $client->call('LIST /orgs/{org}/rulesets/{ruleset_id}/history')); +assertType('Schema\\RulesetVersion', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}')); assertType('Observable', $client->call('GET /orgs/{org}/secret-scanning/alerts')); assertType('Observable', $client->call('LIST /orgs/{org}/secret-scanning/alerts')); assertType('Observable', $client->call('GET /orgs/{org}/security-advisories')); @@ -941,6 +944,9 @@ function authHeader(): string assertType('', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}')); +assertType('iterable', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history')); +assertType('iterable', $client->call('LIST /repos/{owner}/{repo}/rulesets/{ruleset_id}/history')); +assertType('Schema\\RulesetVersion', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}')); assertType('Observable|WithoutBody', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts')); assertType('Observable|WithoutBody', $client->call('LIST /repos/{owner}/{repo}/secret-scanning/alerts')); assertType('', $client->call('GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 4694163e0f2..bdf7dc607c9 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -15240,6 +15240,90 @@ paths: "$ref": "#/components/responses/not_found" '500': "$ref": "#/components/responses/internal_error" + "/orgs/{org}/rulesets/{ruleset_id}/history": + get: + summary: Get organization ruleset history + description: Get the history of an organization ruleset. + tags: + - orgs + operationId: orgs/get-org-ruleset-history + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/rules#get-organization-ruleset-history + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - name: ruleset_id + description: The ID of the ruleset. + in: path + required: true + schema: + type: integer + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/ruleset-version" + examples: + default: + "$ref": "#/components/examples/ruleset-history" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: rules + "/orgs/{org}/rulesets/{ruleset_id}/history/{version_id}": + get: + summary: Get organization ruleset version + description: Get a version of an organization ruleset. + tags: + - orgs + operationId: orgs/get-org-ruleset-version + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/orgs/rules#get-organization-ruleset-version + parameters: + - "$ref": "#/components/parameters/org" + - name: ruleset_id + description: The ID of the ruleset. + in: path + required: true + schema: + type: integer + - name: version_id + description: The ID of the version + in: path + required: true + schema: + type: integer + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/ruleset-version-with-state" + examples: + default: + "$ref": "#/components/examples/org-ruleset-version-with-state" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: rules "/orgs/{org}/secret-scanning/alerts": get: summary: List secret scanning alerts for an organization @@ -21379,12 +21463,19 @@ paths: "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": get: summary: Get workflow run usage - description: |- - Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - - Anyone with read access to the repository can use this endpoint. - - OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + description: "> [!WARNING] \n> This endpoint is in the process of closing down. + Refer to \"[Actions Get workflow usage and Get workflow run usage endpoints + closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)\" + for more information.\n\nGets the number of billable minutes and total run + time for a specific workflow run. Billable minutes only apply to workflows + in private repositories that use GitHub-hosted runners. Usage is listed for + each GitHub-hosted runner operating system in milliseconds. Any job re-runs + are also included in the usage. The usage does not include the multiplier + for macOS and Windows runners and is not rounded up to the nearest whole minute. + For more information, see \"[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nAnyone + with read access to the repository can use this endpoint.\n\nOAuth app tokens + and personal access tokens (classic) need the `repo` scope to use this endpoint + with a private repository." tags: - actions operationId: actions/get-workflow-run-usage @@ -22069,14 +22160,20 @@ paths: "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": get: summary: Get workflow usage - description: |- - Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - - You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. - - Anyone with read access to the repository can use this endpoint. - - OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + description: "> [!WARNING] \n> This endpoint is in the process of closing down. + Refer to \"[Actions Get workflow usage and Get workflow run usage endpoints + closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)\" + for more information.\n\nGets the number of billable minutes used by a specific + workflow during the current billing cycle. Billable minutes only apply to + workflows in private repositories that use GitHub-hosted runners. Usage is + listed for each GitHub-hosted runner operating system in milliseconds. Any + job re-runs are also included in the usage. The usage does not include the + multiplier for macOS and Windows runners and is not rounded up to the nearest + whole minute. For more information, see \"[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)\".\n\nYou + can replace `workflow_id` with the workflow file name. For example, you could + use `main.yaml`.\n\nAnyone with read access to the repository can use this + endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the + `repo` scope to use this endpoint with a private repository." tags: - actions operationId: actions/get-workflow-usage @@ -35352,7 +35449,7 @@ paths: "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false + enabledForGitHubApps: true category: reactions subcategory: reactions "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": @@ -40832,6 +40929,92 @@ paths: "$ref": "#/components/responses/not_found" '500': "$ref": "#/components/responses/internal_error" + "/repos/{owner}/{repo}/rulesets/{ruleset_id}/history": + get: + summary: Get repository ruleset history + description: Get the history of a repository ruleset. + tags: + - repos + operationId: repos/get-repo-ruleset-history + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/rules#get-repository-ruleset-history + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - name: ruleset_id + description: The ID of the ruleset. + in: path + required: true + schema: + type: integer + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/ruleset-version" + examples: + default: + "$ref": "#/components/examples/ruleset-history" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: rules + "/repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}": + get: + summary: Get repository ruleset version + description: Get a version of a repository ruleset. + tags: + - repos + operationId: repos/get-repo-ruleset-version + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/repos/rules#get-repository-ruleset-version + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: ruleset_id + description: The ID of the ruleset. + in: path + required: true + schema: + type: integer + - name: version_id + description: The ID of the version + in: path + required: true + schema: + type: integer + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/ruleset-version-with-state" + examples: + default: + "$ref": "#/components/examples/repository-ruleset-version-with-state" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: rules "/repos/{owner}/{repo}/secret-scanning/alerts": get: summary: List secret scanning alerts for a repository @@ -79644,6 +79827,39 @@ components: - 'null' description: The detailed failure message for the rule. Null if the rule passed. + ruleset-version: + title: Ruleset version + type: object + description: The historical version of a ruleset + required: + - version_id + - actor + - updated_at + properties: + version_id: + type: integer + description: The ID of the previous version of the ruleset + actor: + type: object + description: The actor who updated the ruleset + properties: + id: + type: integer + type: + type: string + updated_at: + type: string + format: date-time + ruleset-version-with-state: + allOf: + - "$ref": "#/components/schemas/ruleset-version" + - type: object + required: + - state + properties: + state: + type: object + description: The state of the ruleset version repository-advisory-vulnerability: description: A product affected by the vulnerability detailed in a repository security advisory. @@ -211050,6 +211266,60 @@ components: enforcement: evaluate result: fail rule_type: commit_message_pattern + ruleset-history: + value: + - version_id: 3 + actor: + id: 1 + type: User + updated_at: 2024-010-23T16:29:47Z + - version_id: 2 + actor: + id: 2 + type: User + updated_at: '2024-09-23T16:29:47Z' + - version_id: 1 + actor: + id: 1 + type: User + updated_at: '2024-08-23T16:29:47Z' + org-ruleset-version-with-state: + value: + - version_id: 3 + actor: + id: 1 + type: User + updated_at: 2024-010-23T16:29:47Z + state: + id: 21 + name: super cool ruleset + target: branch + source_type: Organization + source: my-org + enforcement: active + bypass_actors: + - actor_id: 234 + actor_type: Team + bypass_mode: always + conditions: + ref_name: + include: + - refs/heads/main + - refs/heads/master + exclude: + - refs/heads/dev* + repository_name: + include: + - important_repository + - another_important_repository + exclude: + - unimportant_repository + protected: true + rules: + - type: commit_author_email_pattern + parameters: + operator: contains + pattern: github list-repository-advisories: value: - ghsa_id: GHSA-abcd-1234-efgh @@ -223169,6 +223439,36 @@ components: href: https://github.com/monalisa/my-repo/rules/42 created_at: '2023-07-15T08:43:03Z' updated_at: '2023-08-23T16:29:47Z' + repository-ruleset-version-with-state: + value: + - version_id: 3 + actor: + id: 1 + type: User + updated_at: 2024-010-23T16:29:47Z + state: + id: 42 + name: super cool ruleset + target: branch + source_type: Repository + source: monalisa/my-repo + enforcement: active + bypass_actors: + - actor_id: 234 + actor_type: Team + bypass_mode: always + conditions: + ref_name: + include: + - refs/heads/main + - refs/heads/master + exclude: + - refs/heads/dev* + rules: + - type: commit_author_email_pattern + parameters: + operator: contains + pattern: github secret-scanning-alert-list: value: - number: 2