diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index df2ea1e8350..35c977d831a 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -5828,26 +5828,6 @@ $client->operations()->migrations()->listReposForOrgListing( org: 'genera You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/migrations/orgs#list-repositories-in-an-organization-migration). -### orgs/list-organization-fine-grained-permissions - -List organization fine-grained permissions for an organization - -Using the `call` method: -```php -$client->call('GET /orgs/{org}/organization-fine-grained-permissions', [ - 'org' => 'generated', -]); -``` - -Operations method: -```php -$client->operations()->orgs()->listOrganizationFineGrainedPermissions( org: 'generated', -); -``` - -You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization). - - ### orgs/list-org-roles Get all organization roles for an organization @@ -5868,26 +5848,6 @@ $client->operations()->orgs()->listOrgRoles( org: 'generated', You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/organization-roles#get-all-organization-roles-for-an-organization). -### orgs/create-custom-organization-role - -Create a custom organization role - -Using the `call` method: -```php -$client->call('POST /orgs/{org}/organization-roles', [ - 'org' => 'generated', -]); -``` - -Operations method: -```php -$client->operations()->orgs()->createCustomOrganizationRole( org: 'generated', -); -``` - -You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/organization-roles#create-a-custom-organization-role). - - ### orgs/revoke-all-org-roles-team Remove all organization roles for a team @@ -6050,50 +6010,6 @@ $client->operations()->orgs()->getOrgRole( org: 'generated', You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/organization-roles#get-an-organization-role). -### orgs/delete-custom-organization-role - -Delete a custom organization role. - -Using the `call` method: -```php -$client->call('DELETE /orgs/{org}/organization-roles/{role_id}', [ - 'org' => 'generated', - 'role_id' => 7, -]); -``` - -Operations method: -```php -$client->operations()->orgs()->deleteCustomOrganizationRole( org: 'generated', - role_id: 7, -); -``` - -You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/organization-roles#delete-a-custom-organization-role). - - -### orgs/patch-custom-organization-role - -Update a custom organization role - -Using the `call` method: -```php -$client->call('PATCH /orgs/{org}/organization-roles/{role_id}', [ - 'org' => 'generated', - 'role_id' => 7, -]); -``` - -Operations method: -```php -$client->operations()->orgs()->patchCustomOrganizationRole( org: 'generated', - role_id: 7, -); -``` - -You can find more about this operation over at the [API method documentation](https://docs.github.com/rest/orgs/organization-roles#update-a-custom-organization-role). - - ### orgs/list-org-role-teams List teams that are assigned to an organization role @@ -7422,6 +7338,7 @@ Using the `call` method: ```php $client->call('GET /orgs/{org}/rulesets/rule-suites', [ 'org' => 'generated', + 'ref' => 'generated', 'repository_name' => 15, 'actor_name' => 'generated', 'time_period' => 'generated', @@ -7434,6 +7351,7 @@ $client->call('GET /orgs/{org}/rulesets/rule-suites', [ Operations method: ```php $client->operations()->repos()->getOrgRuleSuites( org: 'generated', + ref: 'generated', repository_name: 15, actor_name: 'generated', time_period: 'generated', @@ -7454,6 +7372,7 @@ Using the `call` method: ```php $client->call('LIST /orgs/{org}/rulesets/rule-suites', [ 'org' => 'generated', + 'ref' => 'generated', 'repository_name' => 15, 'actor_name' => 'generated', 'time_period' => 'generated', @@ -7466,6 +7385,7 @@ $client->call('LIST /orgs/{org}/rulesets/rule-suites', [ Operations method: ```php $client->operations()->repos()->getOrgRuleSuitesListing( org: 'generated', + ref: 'generated', repository_name: 15, actor_name: 'generated', time_period: 'generated', diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index c619cb08367..c0020ac32ab 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "c956dacd1ed3014e8efb91f1eb6a337d", + "specHash": "a0f103fbdfbd51bde7455e34664c5ba3", "generatedFiles": { "files": [ { @@ -1052,7 +1052,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Environment.php", - "hash": "90a796c9fb992a302bc1f76d11898908" + "hash": "bd11fbb0350b750ff9bb6b3495723efd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicy.php", @@ -5040,7 +5040,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Repos\/GetAllEnvironments\/Response\/ApplicationJson\/Ok.php", - "hash": "7585a317fa3c34dc1e91c96be808faf0" + "hash": "3e5990b6be361566b12777884a18fd24" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateOrUpdateEnvironment\/Request\/ApplicationJson.php", @@ -5076,7 +5076,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Git\/CreateCommit\/Request\/ApplicationJson.php", - "hash": "6b72a386bf2186de9eb0ea6c3ff14ece" + "hash": "e989bf7176aafe35e659afe496dbc3bb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Git\/CreateCommit\/Request\/ApplicationJson\/Author.php", @@ -5576,7 +5576,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "04a4181b514e74b22765c1f5edf6516e" + "hash": "c695d5fa74fcde6b19cda5d1ddeb9cdc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -5612,7 +5612,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "b05be33ef97b8b7d3366d6e585dcd44a" + "hash": "6147c93086966ff22ffc67c0545c8cb7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -17044,7 +17044,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/CheckAutomatedSecurityFixes.php", - "hash": "80f967cdb9cdd63cbcd64a69372c81e9" + "hash": "661435f046f86ba7d65213887f17c7f1" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/CheckAutomatedSecurityFixesTest.php", @@ -24468,7 +24468,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "cac7cc6726f33eb7bb3fda8e6fefb3a6" + "hash": "1256b670070c657cdeb23640900c56a2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -24476,7 +24476,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "99af889ce5ea9d2586ba5898f4edc7b3" + "hash": "c5fcb3b19693b3f90f063ba78a1adc3c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", @@ -24572,7 +24572,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Orgs.php", - "hash": "a42a82d71c8cd244529d18cd25c5e72b" + "hash": "aab55b98f2b34fb53b59e3c3c230daf3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Migrations.php", @@ -24676,7 +24676,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Orgs.php", - "hash": "a4738e3908b642cb71178105561edf05" + "hash": "279091946a956396eddbdeb7d0046b5d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Teams.php", @@ -24752,7 +24752,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php", - "hash": "91846cea69243c2f2d085dfecc115551" + "hash": "2dc2d1aa25939ec46e3106fc8cc1dd90" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php", @@ -24828,7 +24828,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Orgs.php", - "hash": "ff1824041442991ab3db61257bb630d9" + "hash": "fc2e156a854552a3e4ab12a89471a39c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Teams.php", @@ -24964,15 +24964,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php", - "hash": "66f426f795956d2d3212a1f1f9021a7e" + "hash": "5569b73dc45f3684b242e5513e522b01" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "f7000d6c43a48afcf7602d52940ffd2a" + "hash": "63ea72b984c1a78b96cd0f59f487f334" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "d6791bf4eef961bd113ec842aa9b509a" + "hash": "23df111dea4f9c5d692649db369af122" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -24992,7 +24992,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Four.php", - "hash": "f9fb9bbe2f9636290689208d7c7b015b" + "hash": "b1f17506654283434db12cdb8fed96fb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", @@ -25036,7 +25036,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Five.php", - "hash": "6196a465e46c425b001fd5c0c162ec1c" + "hash": "d53283196df1b4f9b023c74043374bf8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php", @@ -25072,11 +25072,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "847f3fb360c2b185cfe50d6fb2ad225b" + "hash": "24a252dc0f60a98121c41db92b4fc10d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Six.php", - "hash": "308c392e37c1750ea31302f83f39951f" + "hash": "854592a792479803f65817b8fb8dc4b8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/List\/Seven.php", @@ -25100,7 +25100,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Five.php", - "hash": "41cdbb335fe1a6b3b344cca4cd0ae5ec" + "hash": "0b39dc5131bad6e5eaf69a14de010a69" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Three.php", @@ -25112,7 +25112,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Six.php", - "hash": "08ccaed3cd1c6bf14a3562ee889d0655" + "hash": "ca355d92539b542ef91be76d2fb5450d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/Eight.php", @@ -25176,7 +25176,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "6a427f682377fe3c4636b772e67b5bf4" + "hash": "948d837a16c9556164aba7711b2020c2" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -27168,7 +27168,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "5acd7ef5acdf5f96cee2384a7f5c9bb9" + "hash": "11381cbdcb181eb75fe005455ce94cce" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27396,27 +27396,27 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetOrgRuleSuites.php", - "hash": "e4bdb60845ff74636cfd1e9099c66111" + "hash": "d3aed4ef214de6361c8ca0b45e7f70aa" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetOrgRuleSuites.php", - "hash": "c26300629c7d2b2a2cc0000ed6a68671" + "hash": "1e1db1d8112a4846d4d245a5400d3ad7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetOrgRuleSuitesTest.php", - "hash": "91f1b6d1379c7c3498875eea1b91e771" + "hash": "a142f4e3486496473b3c504b166d3407" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetOrgRuleSuitesListing.php", - "hash": "e1af207bef15725f5dac9e08578f6d91" + "hash": "eedf6f843ca19d71731c856445c3aa63" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetOrgRuleSuitesListing.php", - "hash": "6a0275fa39debf61b1c57f2ce82b6ff4" + "hash": "18d8b71770f211fa73139a753cad9cea" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetOrgRuleSuitesListingTest.php", - "hash": "a89d5750746a46c1a51afa760d370574" + "hash": "92eacd96b366452ddec1b52eba12f56e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetOrgRuleSuite.php", @@ -27432,11 +27432,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRuleSuites.php", - "hash": "35a64dc95146e31847f928d878853846" + "hash": "302f93fba8499e154a149399cf64ba38" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRuleSuites.php", - "hash": "3f26606fb72cd82ac11173f00d4f0bb9" + "hash": "44c35ce9b778591b251392daac746775" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRuleSuitesTest.php", @@ -27444,11 +27444,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRuleSuitesListing.php", - "hash": "c7a6e75853916dad5df732c7701a236f" + "hash": "8dcd35b357baa2578eb8b5138dc4141c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRuleSuitesListing.php", - "hash": "2c55b972d1a7c6537d1ab0cfe1b9db49" + "hash": "7df9ac5ef34dd39c376cb51361c1997d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRuleSuitesListingTest.php", @@ -27788,11 +27788,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "c4f8b4e0d0daaf6de6571573822d30a7" + "hash": "37c348a6df4dab035d5fb65ee966a998" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "ff978093ecf334a8785c1f3add0fabe3" + "hash": "a9742a0f8b2cb167cdccef830c74e394" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -28370,18 +28370,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeScanningRefFull.php", "hash": "6da6fd316a07b0b63765f27637aa4106" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListOrganizationFineGrainedPermissions.php", - "hash": "4108cd828cc3f998acb41cc263e362b9" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListOrganizationFineGrainedPermissions.php", - "hash": "5e104a97bdb85c4ea33d7a932a7353f0" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListOrganizationFineGrainedPermissionsTest.php", - "hash": "762af790443b03332ef6da47ed61274d" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListOrgRoles.php", "hash": "769fdd8dade56abac6749d1fef6c8bb6" @@ -28394,18 +28382,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListOrgRolesTest.php", "hash": "04b18c54e39286a6eaf942872034f19d" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/CreateCustomOrganizationRole.php", - "hash": "4520df7eb0edb26aa7800a50dac2157d" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/CreateCustomOrganizationRole.php", - "hash": "7a35770e145ba2bd758afafc8ce8c9b1" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/CreateCustomOrganizationRoleTest.php", - "hash": "63a71c61cb112274b0ff6f49450801ca" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/RevokeAllOrgRolesTeam.php", "hash": "a2f8f6d91f8126229dab69775e7800e6" @@ -28466,26 +28442,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/GetOrgRoleTest.php", "hash": "5b7a1fdde1dcf8b809cab1bd03d508ae" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/DeleteCustomOrganizationRole.php", - "hash": "42bd20a51535cab84ec61da3198179d9" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/DeleteCustomOrganizationRole.php", - "hash": "30278d817ccd042f5d13247904cb8364" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/PatchCustomOrganizationRole.php", - "hash": "dae933bde0ab9d067b8f3b54d559dace" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/PatchCustomOrganizationRole.php", - "hash": "03643f57e27dfe3d61f23fa1a5df4c37" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/PatchCustomOrganizationRoleTest.php", - "hash": "d434fa125d6e22dcf2511ac8941833be" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListOrgRoleTeams.php", "hash": "ba58781ba12e7cde3a414dda69c2fb1d" @@ -28534,10 +28490,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListOrgRoleUsersListingTest.php", "hash": "92aebac9056f9876f6b872ee0d90dcaf" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationFineGrainedPermission.php", - "hash": "044a2fc905a6e4f0e3e807a76d30cd4a" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationRole.php", "hash": "e6e265ccfc2002757bca49407383246e" @@ -28546,21 +28498,9 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Orgs\/ListOrgRoles\/Response\/ApplicationJson\/Ok.php", "hash": "6aef97724541dd01d02e1159d8dcb633" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateCustomOrganizationRole\/Request\/ApplicationJson.php", - "hash": "a751b1e299870bed02378ce096f38464" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Orgs\/PatchCustomOrganizationRole\/Request\/ApplicationJson.php", - "hash": "f46a3db6574bbd54c131d305faa97a3e" - }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/OrganizationFineGrainedPermissions.php", - "hash": "36fbf178b0139a72f73dac76dec04cf3" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/OrganizationRoles.php", - "hash": "2c890a792f7d5be4dcbf09004e650f90" + "hash": "5e47c4a3c1af523063268c6b2f9eb46c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/OrganizationRoles\/RoleId.php", @@ -29884,7 +29824,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Delete\/CodeSecurity.php", - "hash": "fb93ff0e33eac9591443590799764b01" + "hash": "c6a8dddb7f3240ecfdabf8fb78e3fb92" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Put\/CodeSecurity.php", @@ -29892,7 +29832,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/CodeSecurity.php", - "hash": "b4c7c93d9dbb2fd7c7f460a2962ab710" + "hash": "69b58673fdc33c66efd5fbf66cce22fa" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations.php", @@ -30308,7 +30248,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/DetachConfiguration.php", - "hash": "2ca4499f84bbfaa55ef332d199c03945" + "hash": "0884faf785bcfff59c349a32b358e5bb" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/DetachConfigurationTest.php", diff --git a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/OrganizationFineGrainedPermissions.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/OrganizationFineGrainedPermissions.php deleted file mode 100644 index fff3babd539..00000000000 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/OrganizationFineGrainedPermissions.php +++ /dev/null @@ -1,370 +0,0 @@ - $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), - 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($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 hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError(array $payload): ValidationError - { - $properties = []; - $missingFields = []; - try { - $value = $payload['message'] ?? null; - - if ($value === null) { - $missingFields[] = 'message'; - goto after_message; - } - - $properties['message'] = $value; - - after_message: - - $value = $payload['documentation_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'documentation_url'; - goto after_documentationUrl; - } - - $properties['documentationUrl'] = $value; - - after_documentationUrl: - - $value = $payload['errors'] ?? null; - - if ($value === null) { - $properties['errors'] = null; - goto after_errors; - } - - $properties['errors'] = $value; - - after_errors: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ValidationError', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(ValidationError::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new ValidationError(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\ValidationError', $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), - 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($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; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError(mixed $object): mixed - { - assert($object instanceof ValidationError); - $result = []; - - $message = $object->message; - after_message: $result['message'] = $message; - - $documentationUrl = $object->documentationUrl; - after_documentationUrl: $result['documentation_url'] = $documentationUrl; - - $errors = $object->errors; - - if ($errors === null) { - goto after_errors; - } - - static $errorsSerializer0; - - if ($errorsSerializer0 === null) { - $errorsSerializer0 = new SerializeArrayItems(...[]); - } - - $errors = $errorsSerializer0->serialize($errors, $this); - after_errors: $result['errors'] = $errors; - - 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/OrganizationRoles.php b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/OrganizationRoles.php index c8f7e43d477..adb2abf1542 100644 --- a/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/OrganizationRoles.php +++ b/clients/GitHub/src/Internal/Hydrator/Operation/Orgs/Org/OrganizationRoles.php @@ -6,8 +6,6 @@ use ApiClients\Client\GitHub\Schema\BasicError; use ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok; -use ApiClients\Client\GitHub\Schema\OrganizationRole; -use ApiClients\Client\GitHub\Schema\SimpleUser; use ApiClients\Client\GitHub\Schema\ValidationError; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -20,11 +18,9 @@ use LogicException; use Throwable; -use function array_pop; use function assert; use function count; use function is_a; -use function is_array; class OrganizationRoles implements ObjectMapper { @@ -47,8 +43,6 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Orgs⚡️ListOrgRoles⚡️Response⚡️ApplicationJson⚡️Ok($payload), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($payload), 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($payload), - 'ApiClients\Client\GitHub\Schema\OrganizationRole' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationRole($payload), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; } @@ -209,361 +203,6 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Vali } } - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationRole(array $payload): OrganizationRole - { - $properties = []; - $missingFields = []; - try { - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['name'] ?? null; - - if ($value === null) { - $missingFields[] = 'name'; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['description'] ?? null; - - if ($value === null) { - $properties['description'] = null; - goto after_description; - } - - $properties['description'] = $value; - - after_description: - - $value = $payload['permissions'] ?? null; - - if ($value === null) { - $missingFields[] = 'permissions'; - goto after_permissions; - } - - $properties['permissions'] = $value; - - after_permissions: - - $value = $payload['organization'] ?? null; - - if ($value === null) { - $properties['organization'] = null; - goto after_organization; - } - - if (is_array($value)) { - try { - $this->hydrationStack[] = 'organization'; - $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); - } finally { - array_pop($this->hydrationStack); - } - } - - $properties['organization'] = $value; - - after_organization: - - $value = $payload['created_at'] ?? null; - - if ($value === null) { - $missingFields[] = 'created_at'; - goto after_createdAt; - } - - $properties['createdAt'] = $value; - - after_createdAt: - - $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\OrganizationRole', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(OrganizationRole::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new OrganizationRole(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\OrganizationRole', $exception, stack: $this->hydrationStack); - } - } - - private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(array $payload): SimpleUser - { - $properties = []; - $missingFields = []; - try { - $value = $payload['name'] ?? null; - - if ($value === null) { - $properties['name'] = null; - goto after_name; - } - - $properties['name'] = $value; - - after_name: - - $value = $payload['email'] ?? null; - - if ($value === null) { - $properties['email'] = null; - goto after_email; - } - - $properties['email'] = $value; - - after_email: - - $value = $payload['login'] ?? null; - - if ($value === null) { - $missingFields[] = 'login'; - goto after_login; - } - - $properties['login'] = $value; - - after_login: - - $value = $payload['id'] ?? null; - - if ($value === null) { - $missingFields[] = 'id'; - goto after_id; - } - - $properties['id'] = $value; - - after_id: - - $value = $payload['node_id'] ?? null; - - if ($value === null) { - $missingFields[] = 'node_id'; - goto after_nodeId; - } - - $properties['nodeId'] = $value; - - after_nodeId: - - $value = $payload['avatar_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'avatar_url'; - goto after_avatarUrl; - } - - $properties['avatarUrl'] = $value; - - after_avatarUrl: - - $value = $payload['gravatar_id'] ?? null; - - if ($value === null) { - $properties['gravatarId'] = null; - goto after_gravatarId; - } - - $properties['gravatarId'] = $value; - - after_gravatarId: - - $value = $payload['url'] ?? null; - - if ($value === null) { - $missingFields[] = 'url'; - goto after_url; - } - - $properties['url'] = $value; - - after_url: - - $value = $payload['html_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'html_url'; - goto after_htmlUrl; - } - - $properties['htmlUrl'] = $value; - - after_htmlUrl: - - $value = $payload['followers_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'followers_url'; - goto after_followersUrl; - } - - $properties['followersUrl'] = $value; - - after_followersUrl: - - $value = $payload['following_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'following_url'; - goto after_followingUrl; - } - - $properties['followingUrl'] = $value; - - after_followingUrl: - - $value = $payload['gists_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'gists_url'; - goto after_gistsUrl; - } - - $properties['gistsUrl'] = $value; - - after_gistsUrl: - - $value = $payload['starred_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'starred_url'; - goto after_starredUrl; - } - - $properties['starredUrl'] = $value; - - after_starredUrl: - - $value = $payload['subscriptions_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'subscriptions_url'; - goto after_subscriptionsUrl; - } - - $properties['subscriptionsUrl'] = $value; - - after_subscriptionsUrl: - - $value = $payload['organizations_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'organizations_url'; - goto after_organizationsUrl; - } - - $properties['organizationsUrl'] = $value; - - after_organizationsUrl: - - $value = $payload['repos_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'repos_url'; - goto after_reposUrl; - } - - $properties['reposUrl'] = $value; - - after_reposUrl: - - $value = $payload['events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'events_url'; - goto after_eventsUrl; - } - - $properties['eventsUrl'] = $value; - - after_eventsUrl: - - $value = $payload['received_events_url'] ?? null; - - if ($value === null) { - $missingFields[] = 'received_events_url'; - goto after_receivedEventsUrl; - } - - $properties['receivedEventsUrl'] = $value; - - after_receivedEventsUrl: - - $value = $payload['type'] ?? null; - - if ($value === null) { - $missingFields[] = 'type'; - goto after_type; - } - - $properties['type'] = $value; - - after_type: - - $value = $payload['site_admin'] ?? null; - - if ($value === null) { - $missingFields[] = 'site_admin'; - goto after_siteAdmin; - } - - $properties['siteAdmin'] = $value; - - after_siteAdmin: - - $value = $payload['starred_at'] ?? null; - - if ($value === null) { - $properties['starredAt'] = null; - goto after_starredAt; - } - - $properties['starredAt'] = $value; - - after_starredAt: - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - - if (count($missingFields) > 0) { - throw UnableToHydrateObject::dueToMissingFields(SimpleUser::class, $missingFields, stack: $this->hydrationStack); - } - - try { - return new SimpleUser(...$properties); - } catch (Throwable $exception) { - throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\SimpleUser', $exception, stack: $this->hydrationStack); - } - } - private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array { foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { @@ -598,8 +237,6 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Operations⚡️Orgs⚡️ListOrgRoles⚡️Response⚡️ApplicationJson⚡️Ok($object), 'ApiClients\Client\GitHub\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️BasicError($object), 'ApiClients\Client\GitHub\Schema\ValidationError' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️ValidationError($object), - 'ApiClients\Client\GitHub\Schema\OrganizationRole' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationRole($object), - 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), default => throw new LogicException('No serialization defined for $className'), }; } catch (Throwable $exception) { @@ -762,144 +399,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationRole(mixed $object): mixed - { - assert($object instanceof OrganizationRole); - $result = []; - - $id = $object->id; - after_id: $result['id'] = $id; - - $name = $object->name; - after_name: $result['name'] = $name; - - $description = $object->description; - - if ($description === null) { - goto after_description; - } - - after_description: $result['description'] = $description; - - $permissions = $object->permissions; - static $permissionsSerializer0; - - if ($permissionsSerializer0 === null) { - $permissionsSerializer0 = new SerializeArrayItems(...[]); - } - - $permissions = $permissionsSerializer0->serialize($permissions, $this); - after_permissions: $result['permissions'] = $permissions; - - $organization = $object->organization; - - if ($organization === null) { - goto after_organization; - } - - $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($organization); - after_organization: $result['organization'] = $organization; - - $createdAt = $object->createdAt; - after_createdAt: $result['created_at'] = $createdAt; - - $updatedAt = $object->updatedAt; - after_updatedAt: $result['updated_at'] = $updatedAt; - - return $result; - } - - private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser(mixed $object): mixed - { - assert($object instanceof SimpleUser); - $result = []; - - $name = $object->name; - - if ($name === null) { - goto after_name; - } - - after_name: $result['name'] = $name; - - $email = $object->email; - - if ($email === null) { - goto after_email; - } - - after_email: $result['email'] = $email; - - $login = $object->login; - after_login: $result['login'] = $login; - - $id = $object->id; - after_id: $result['id'] = $id; - - $nodeId = $object->nodeId; - after_nodeId: $result['node_id'] = $nodeId; - - $avatarUrl = $object->avatarUrl; - after_avatarUrl: $result['avatar_url'] = $avatarUrl; - - $gravatarId = $object->gravatarId; - - if ($gravatarId === null) { - goto after_gravatarId; - } - - after_gravatarId: $result['gravatar_id'] = $gravatarId; - - $url = $object->url; - after_url: $result['url'] = $url; - - $htmlUrl = $object->htmlUrl; - after_htmlUrl: $result['html_url'] = $htmlUrl; - - $followersUrl = $object->followersUrl; - after_followersUrl: $result['followers_url'] = $followersUrl; - - $followingUrl = $object->followingUrl; - after_followingUrl: $result['following_url'] = $followingUrl; - - $gistsUrl = $object->gistsUrl; - after_gistsUrl: $result['gists_url'] = $gistsUrl; - - $starredUrl = $object->starredUrl; - after_starredUrl: $result['starred_url'] = $starredUrl; - - $subscriptionsUrl = $object->subscriptionsUrl; - after_subscriptionsUrl: $result['subscriptions_url'] = $subscriptionsUrl; - - $organizationsUrl = $object->organizationsUrl; - after_organizationsUrl: $result['organizations_url'] = $organizationsUrl; - - $reposUrl = $object->reposUrl; - after_reposUrl: $result['repos_url'] = $reposUrl; - - $eventsUrl = $object->eventsUrl; - after_eventsUrl: $result['events_url'] = $eventsUrl; - - $receivedEventsUrl = $object->receivedEventsUrl; - after_receivedEventsUrl: $result['received_events_url'] = $receivedEventsUrl; - - $type = $object->type; - after_type: $result['type'] = $type; - - $siteAdmin = $object->siteAdmin; - after_siteAdmin: $result['site_admin'] = $siteAdmin; - - $starredAt = $object->starredAt; - - if ($starredAt === null) { - goto after_starredAt; - } - - after_starredAt: $result['starred_at'] = $starredAt; - - return $result; - } - /** * @param class-string $className * @param iterable $payloads; diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index c1363f8af4f..860e803710a 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -161,7 +161,6 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Orgs\Org\Migrations\MigrationId\Archive|null $operation🌀Orgs🌀Org🌀Migrations🌀MigrationId🌀Archive = null; private Internal\Hydrator\Operation\Orgs\Org\Migrations\MigrationId\Repos\RepoName\Lock|null $operation🌀Orgs🌀Org🌀Migrations🌀MigrationId🌀Repos🌀RepoName🌀Lock = null; private Internal\Hydrator\Operation\Orgs\Org\Migrations\MigrationId\Repositories|null $operation🌀Orgs🌀Org🌀Migrations🌀MigrationId🌀Repositories = null; - private Internal\Hydrator\Operation\Orgs\Org\OrganizationFineGrainedPermissions|null $operation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions = null; private Internal\Hydrator\Operation\Orgs\Org\OrganizationRoles|null $operation🌀Orgs🌀Org🌀OrganizationRoles = null; private Internal\Hydrator\Operation\Orgs\Org\OrganizationRoles\Teams\TeamSlug|null $operation🌀Orgs🌀Org🌀OrganizationRoles🌀Teams🌀TeamSlug = null; private Internal\Hydrator\Operation\Orgs\Org\OrganizationRoles\Teams\TeamSlug\RoleId|null $operation🌀Orgs🌀Org🌀OrganizationRoles🌀Teams🌀TeamSlug🌀RoleId = null; @@ -793,7 +792,8 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatDetails' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Copilot()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimple', '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership\\Permissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Memberships🌀Username()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Migration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Migrations()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListOrgRoles\\Response\\ApplicationJson\\Ok', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationRole' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListOrgRoles\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationRole' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles🌀RoleId()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ConvertMemberToOutsideCollaborator\\Response\\ApplicationJson\\Accepted\\Application\\Json', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\RemoveOutsideCollaborator\\Response\\ApplicationJson\\UnprocessableEntity' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OutsideCollaborators🌀Username()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\Package' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Packages🌀PackageType🌀PackageName()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion', '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion\\Metadata', '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion\\Metadata\\Container', '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion\\Metadata\\Docker' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Packages🌀PackageType🌀PackageName🌀Versions🌀PackageVersionId()->hydrateObject($className, $payload), @@ -1144,7 +1144,8 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\CopilotSeatDetails' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Members🌀Username🌀Copilot()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationSimple', '\\ApiClients\\Client\\GitHub\\Schema\\OrgMembership\\Permissions' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Memberships🌀Username()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Migration' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Migrations()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListOrgRoles\\Response\\ApplicationJson\\Ok', '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationRole' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ListOrgRoles\\Response\\ApplicationJson\\Ok' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\OrganizationRole' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles🌀RoleId()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\ConvertMemberToOutsideCollaborator\\Response\\ApplicationJson\\Accepted\\Application\\Json', '\\ApiClients\\Client\\GitHub\\Schema\\Operations\\Orgs\\RemoveOutsideCollaborator\\Response\\ApplicationJson\\UnprocessableEntity' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀OutsideCollaborators🌀Username()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\Package' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Packages🌀PackageType🌀PackageName()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion', '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion\\Metadata', '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion\\Metadata\\Container', '\\ApiClients\\Client\\GitHub\\Schema\\PackageVersion\\Metadata\\Docker' => $this->getObjectMapperOperation🌀Orgs🌀Org🌀Packages🌀PackageType🌀PackageName🌀Versions🌀PackageVersionId()->serializeObject($object), @@ -2760,15 +2761,6 @@ public function getObjectMapperOperation🌀Orgs🌀Org🌀Migrations🌀Migrati return $this->operation🌀Orgs🌀Org🌀Migrations🌀MigrationId🌀Repositories; } - public function getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions(): Internal\Hydrator\Operation\Orgs\Org\OrganizationFineGrainedPermissions - { - if ($this->operation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions instanceof Internal\Hydrator\Operation\Orgs\Org\OrganizationFineGrainedPermissions === false) { - $this->operation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions = new Internal\Hydrator\Operation\Orgs\Org\OrganizationFineGrainedPermissions(); - } - - return $this->operation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions; - } - public function getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles(): Internal\Hydrator\Operation\Orgs\Org\OrganizationRoles { if ($this->operation🌀Orgs🌀Org🌀OrganizationRoles instanceof Internal\Hydrator\Operation\Orgs\Org\OrganizationRoles === false) { diff --git a/clients/GitHub/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php b/clients/GitHub/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php deleted file mode 100644 index 3fd6d13731d..00000000000 --- a/clients/GitHub/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php +++ /dev/null @@ -1,87 +0,0 @@ -org = $org; - } - - public function createRequest(array $data): RequestInterface - { - $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - return new Request('POST', str_replace(['{org}'], [$this->org], '/orgs/{org}/organization-roles'), ['Content-Type' => 'application/json'], json_encode($data)); - } - - public function createResponse(ResponseInterface $response): Schema\OrganizationRole - { - $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 201: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\OrganizationRole::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - return $this->hydrator->hydrateObject(Schema\OrganizationRole::class, $body); - /** - * Validation failed, or the endpoint has been spammed. - **/ - - case 422: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - throw new ErrorSchemas\ValidationError(422, $this->hydrator->hydrateObject(Schema\ValidationError::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)); - /** - * Conflict - **/ - - case 409: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); - } - - break; - } - - throw new RuntimeException('Unable to find matching response code and content type'); - } -} diff --git a/clients/GitHub/src/Internal/Operation/Orgs/DeleteCustomOrganizationRole.php b/clients/GitHub/src/Internal/Operation/Orgs/DeleteCustomOrganizationRole.php deleted file mode 100644 index de636612e3f..00000000000 --- a/clients/GitHub/src/Internal/Operation/Orgs/DeleteCustomOrganizationRole.php +++ /dev/null @@ -1,48 +0,0 @@ -org = $org; - $this->roleId = $roleId; - } - - public function createRequest(): RequestInterface - { - return new Request('DELETE', str_replace(['{org}', '{role_id}'], [$this->org, $this->roleId], '/orgs/{org}/organization-roles/{role_id}')); - } - - public function createResponse(ResponseInterface $response): WithoutBody - { - $code = $response->getStatusCode(); - switch ($code) { - /** - * Response - **/ - case 204: - return new WithoutBody(204, []); - } - - throw new RuntimeException('Unable to find matching response code and content type'); - } -} diff --git a/clients/GitHub/src/Internal/Operation/Orgs/ListOrganizationFineGrainedPermissions.php b/clients/GitHub/src/Internal/Operation/Orgs/ListOrganizationFineGrainedPermissions.php deleted file mode 100644 index d6ce46adc4f..00000000000 --- a/clients/GitHub/src/Internal/Operation/Orgs/ListOrganizationFineGrainedPermissions.php +++ /dev/null @@ -1,90 +0,0 @@ -org = $org; - } - - public function createRequest(): RequestInterface - { - return new Request('GET', str_replace(['{org}'], [$this->org], '/orgs/{org}/organization-fine-grained-permissions')); - } - - /** @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\OrganizationFineGrainedPermission { - $error = new RuntimeException(); - try { - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\OrganizationFineGrainedPermission::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - - return $this->hydrator->hydrateObject(Schema\OrganizationFineGrainedPermission::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)); - /** - * Validation failed, or the endpoint has been spammed. - **/ - - case 422: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - throw new ErrorSchemas\ValidationError(422, $this->hydrator->hydrateObject(Schema\ValidationError::class, $body)); - } - - break; - } - - throw new RuntimeException('Unable to find matching response code and content type'); - } -} diff --git a/clients/GitHub/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php b/clients/GitHub/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php deleted file mode 100644 index 8efa92bd71b..00000000000 --- a/clients/GitHub/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php +++ /dev/null @@ -1,90 +0,0 @@ -org = $org; - $this->roleId = $roleId; - } - - public function createRequest(array $data): RequestInterface - { - $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - return new Request('PATCH', str_replace(['{org}', '{role_id}'], [$this->org, $this->roleId], '/orgs/{org}/organization-roles/{role_id}'), ['Content-Type' => 'application/json'], json_encode($data)); - } - - public function createResponse(ResponseInterface $response): Schema\OrganizationRole - { - $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\OrganizationRole::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - return $this->hydrator->hydrateObject(Schema\OrganizationRole::class, $body); - /** - * Validation failed, or the endpoint has been spammed. - **/ - - case 422: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - throw new ErrorSchemas\ValidationError(422, $this->hydrator->hydrateObject(Schema\ValidationError::class, $body)); - /** - * Conflict - **/ - - case 409: - $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); - - throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); - /** - * 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)); - } - - break; - } - - throw new RuntimeException('Unable to find matching response code and content type'); - } -} diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuites.php b/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuites.php index 7c9b450c7a7..220bfc4dc7f 100644 --- a/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuites.php +++ b/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuites.php @@ -27,6 +27,9 @@ final class GetOrgRuleSuites public const OPERATION_MATCH = 'GET /orgs/{org}/rulesets/rule-suites'; /**The organization name. The name is not case sensitive. **/ private string $org; + /**The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + **/ + private string $ref; /**The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. **/ private int $repositoryName; /**The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. **/ @@ -42,9 +45,10 @@ final class GetOrgRuleSuites /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets\RuleSuites $hydrator, string $org, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1) + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets\RuleSuites $hydrator, string $org, string $ref, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1) { $this->org = $org; + $this->ref = $ref; $this->repositoryName = $repositoryName; $this->actorName = $actorName; $this->timePeriod = $timePeriod; @@ -55,7 +59,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{repository_name}', '{actor_name}', '{time_period}', '{rule_suite_result}', '{per_page}', '{page}'], [$this->org, $this->repositoryName, $this->actorName, $this->timePeriod, $this->ruleSuiteResult, $this->perPage, $this->page], '/orgs/{org}/rulesets/rule-suites' . '?repository_name={repository_name}&actor_name={actor_name}&time_period={time_period}&rule_suite_result={rule_suite_result}&per_page={per_page}&page={page}')); + return new Request('GET', str_replace(['{org}', '{ref}', '{repository_name}', '{actor_name}', '{time_period}', '{rule_suite_result}', '{per_page}', '{page}'], [$this->org, $this->ref, $this->repositoryName, $this->actorName, $this->timePeriod, $this->ruleSuiteResult, $this->perPage, $this->page], '/orgs/{org}/rulesets/rule-suites' . '?ref={ref}&repository_name={repository_name}&actor_name={actor_name}&time_period={time_period}&rule_suite_result={rule_suite_result}&per_page={per_page}&page={page}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuitesListing.php b/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuitesListing.php index 2682cefe878..0a7bbd76853 100644 --- a/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuitesListing.php +++ b/clients/GitHub/src/Internal/Operation/Repos/GetOrgRuleSuitesListing.php @@ -27,6 +27,9 @@ final class GetOrgRuleSuitesListing public const OPERATION_MATCH = 'LIST /orgs/{org}/rulesets/rule-suites'; /**The organization name. The name is not case sensitive. **/ private string $org; + /**The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + **/ + private string $ref; /**The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. **/ private int $repositoryName; /**The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. **/ @@ -42,9 +45,10 @@ final class GetOrgRuleSuitesListing /**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/ private int $page; - public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets\RuleSuites $hydrator, string $org, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1) + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets\RuleSuites $hydrator, string $org, string $ref, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1) { $this->org = $org; + $this->ref = $ref; $this->repositoryName = $repositoryName; $this->actorName = $actorName; $this->timePeriod = $timePeriod; @@ -55,7 +59,7 @@ public function __construct(private readonly SchemaValidator $responseSchemaVali public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{org}', '{repository_name}', '{actor_name}', '{time_period}', '{rule_suite_result}', '{per_page}', '{page}'], [$this->org, $this->repositoryName, $this->actorName, $this->timePeriod, $this->ruleSuiteResult, $this->perPage, $this->page], '/orgs/{org}/rulesets/rule-suites' . '?repository_name={repository_name}&actor_name={actor_name}&time_period={time_period}&rule_suite_result={rule_suite_result}&per_page={per_page}&page={page}')); + return new Request('GET', str_replace(['{org}', '{ref}', '{repository_name}', '{actor_name}', '{time_period}', '{rule_suite_result}', '{per_page}', '{page}'], [$this->org, $this->ref, $this->repositoryName, $this->actorName, $this->timePeriod, $this->ruleSuiteResult, $this->perPage, $this->page], '/orgs/{org}/rulesets/rule-suites' . '?ref={ref}&repository_name={repository_name}&actor_name={actor_name}&time_period={time_period}&rule_suite_result={rule_suite_result}&per_page={per_page}&page={page}')); } /** @return Observable */ diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuites.php b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuites.php index a2f9542cfaf..d455d15cb5d 100644 --- a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuites.php +++ b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuites.php @@ -29,7 +29,8 @@ final class GetRepoRuleSuites private string $owner; /**The name of the repository without the `.git` extension. The name is not case sensitive. **/ private string $repo; - /**The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. **/ + /**The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + **/ private string $ref; /**The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. **/ private string $actorName; diff --git a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuitesListing.php b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuitesListing.php index 786363e91ec..20b7beb85fa 100644 --- a/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuitesListing.php +++ b/clients/GitHub/src/Internal/Operation/Repos/GetRepoRuleSuitesListing.php @@ -29,7 +29,8 @@ final class GetRepoRuleSuitesListing private string $owner; /**The name of the repository without the `.git` extension. The name is not case sensitive. **/ private string $repo; - /**The name of the ref. Cannot contain wildcard characters. When specified, only rule evaluations triggered for this ref will be returned. **/ + /**The name of the ref. Cannot contain wildcard characters. Optionally prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to tags. Omit the prefix to search across all refs. When specified, only rule evaluations triggered for this ref will be returned. + **/ private string $ref; /**The handle for the GitHub user account to filter on. When specified, only rule evaluations triggered by this actor will be returned. **/ private string $actorName; diff --git a/clients/GitHub/src/Internal/Operator/CodeSecurity/DetachConfiguration.php b/clients/GitHub/src/Internal/Operator/CodeSecurity/DetachConfiguration.php index 0226934e075..4129c2b5ce1 100644 --- a/clients/GitHub/src/Internal/Operator/CodeSecurity/DetachConfiguration.php +++ b/clients/GitHub/src/Internal/Operator/CodeSecurity/DetachConfiguration.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, array $params): WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeSecurity\DetachConfiguration($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); diff --git a/clients/GitHub/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php b/clients/GitHub/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php deleted file mode 100644 index 2f07f6d0327..00000000000 --- a/clients/GitHub/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php +++ /dev/null @@ -1,41 +0,0 @@ -requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); - $request = $operation->createRequest($params); - $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): OrganizationRole { - return $operation->createResponse($response); - })); - if ($result instanceof Observable) { - $result = awaitObservable($result); - } - - return $result; - } -} diff --git a/clients/GitHub/src/Internal/Operator/Orgs/DeleteCustomOrganizationRole.php b/clients/GitHub/src/Internal/Operator/Orgs/DeleteCustomOrganizationRole.php deleted file mode 100644 index cb10e17e7ac..00000000000 --- a/clients/GitHub/src/Internal/Operator/Orgs/DeleteCustomOrganizationRole.php +++ /dev/null @@ -1,39 +0,0 @@ -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): WithoutBody { - return $operation->createResponse($response); - })); - if ($result instanceof Observable) { - $result = awaitObservable($result); - } - - return $result; - } -} diff --git a/clients/GitHub/src/Internal/Operator/Orgs/ListOrganizationFineGrainedPermissions.php b/clients/GitHub/src/Internal/Operator/Orgs/ListOrganizationFineGrainedPermissions.php deleted file mode 100644 index 21adb985bbb..00000000000 --- a/clients/GitHub/src/Internal/Operator/Orgs/ListOrganizationFineGrainedPermissions.php +++ /dev/null @@ -1,41 +0,0 @@ - */ - public function call(string $org): iterable - { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\ListOrganizationFineGrainedPermissions($this->responseSchemaValidator, $this->hydrator, $org); - $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/PatchCustomOrganizationRole.php b/clients/GitHub/src/Internal/Operator/Orgs/PatchCustomOrganizationRole.php deleted file mode 100644 index f88316ed396..00000000000 --- a/clients/GitHub/src/Internal/Operator/Orgs/PatchCustomOrganizationRole.php +++ /dev/null @@ -1,41 +0,0 @@ -requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $roleId); - $request = $operation->createRequest($params); - $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): OrganizationRole { - return $operation->createResponse($response); - })); - if ($result instanceof Observable) { - $result = awaitObservable($result); - } - - return $result; - } -} diff --git a/clients/GitHub/src/Internal/Operator/Repos/CheckAutomatedSecurityFixes.php b/clients/GitHub/src/Internal/Operator/Repos/CheckAutomatedSecurityFixes.php index c09daa9d891..6b8892e3a05 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/CheckAutomatedSecurityFixes.php +++ b/clients/GitHub/src/Internal/Operator/Repos/CheckAutomatedSecurityFixes.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $owner, string $repo): \ApiClients\Client\GitHub\Schema\CheckAutomatedSecurityFixes|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\CheckAutomatedSecurityFixes($this->responseSchemaValidator, $this->hydrator, $owner, $repo); diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuites.php b/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuites.php index c3006d42333..2d3cac59075 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuites.php +++ b/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuites.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1): iterable + /** @return iterable */ + public function call(string $org, string $ref, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetOrgRuleSuites($this->responseSchemaValidator, $this->hydrator, $org, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetOrgRuleSuites($this->responseSchemaValidator, $this->hydrator, $org, $ref, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $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); diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuitesListing.php b/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuitesListing.php index 5254552922b..f0a46447fcf 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuitesListing.php +++ b/clients/GitHub/src/Internal/Operator/Repos/GetOrgRuleSuitesListing.php @@ -24,10 +24,10 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ - public function call(string $org, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1): iterable + /** @return iterable */ + public function call(string $org, string $ref, int $repositoryName, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1): iterable { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetOrgRuleSuitesListing($this->responseSchemaValidator, $this->hydrator, $org, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetOrgRuleSuitesListing($this->responseSchemaValidator, $this->hydrator, $org, $ref, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $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); diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuites.php b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuites.php index 771783c9c1a..3bb5e1e1a05 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuites.php +++ b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuites.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $owner, string $repo, string $ref, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetRepoRuleSuites($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $ref, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); diff --git a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuitesListing.php b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuitesListing.php index ec39e4c4bdb..d2f865738e2 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuitesListing.php +++ b/clients/GitHub/src/Internal/Operator/Repos/GetRepoRuleSuitesListing.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return Observable */ + /** @return iterable */ public function call(string $owner, string $repo, string $ref, string $actorName, string $timePeriod = 'day', string $ruleSuiteResult = 'all', int $perPage = 30, int $page = 1): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\GetRepoRuleSuitesListing($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $ref, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); diff --git a/clients/GitHub/src/Internal/Operators.php b/clients/GitHub/src/Internal/Operators.php index a34c4b5b813..9f6b2246def 100644 --- a/clients/GitHub/src/Internal/Operators.php +++ b/clients/GitHub/src/Internal/Operators.php @@ -263,9 +263,7 @@ final class Operators private Internal\Operator\Migrations\UnlockRepoForOrg|null $migrations👷UnlockRepoForOrg = null; private Internal\Operator\Migrations\ListReposForOrg|null $migrations👷ListReposForOrg = null; private Internal\Operator\Migrations\ListReposForOrgListing|null $migrations👷ListReposForOrgListing = null; - private Internal\Operator\Orgs\ListOrganizationFineGrainedPermissions|null $orgs👷ListOrganizationFineGrainedPermissions = null; private Internal\Operator\Orgs\ListOrgRoles|null $orgs👷ListOrgRoles = null; - private Internal\Operator\Orgs\CreateCustomOrganizationRole|null $orgs👷CreateCustomOrganizationRole = null; private Internal\Operator\Orgs\RevokeAllOrgRolesTeam|null $orgs👷RevokeAllOrgRolesTeam = null; private Internal\Operator\Orgs\AssignTeamToOrgRole|null $orgs👷AssignTeamToOrgRole = null; private Internal\Operator\Orgs\RevokeOrgRoleTeam|null $orgs👷RevokeOrgRoleTeam = null; @@ -273,8 +271,6 @@ final class Operators private Internal\Operator\Orgs\AssignUserToOrgRole|null $orgs👷AssignUserToOrgRole = null; private Internal\Operator\Orgs\RevokeOrgRoleUser|null $orgs👷RevokeOrgRoleUser = null; private Internal\Operator\Orgs\GetOrgRole|null $orgs👷GetOrgRole = null; - private Internal\Operator\Orgs\DeleteCustomOrganizationRole|null $orgs👷DeleteCustomOrganizationRole = null; - private Internal\Operator\Orgs\PatchCustomOrganizationRole|null $orgs👷PatchCustomOrganizationRole = null; private Internal\Operator\Orgs\ListOrgRoleTeams|null $orgs👷ListOrgRoleTeams = null; private Internal\Operator\Orgs\ListOrgRoleTeamsListing|null $orgs👷ListOrgRoleTeamsListing = null; private Internal\Operator\Orgs\ListOrgRoleUsers|null $orgs👷ListOrgRoleUsers = null; @@ -3410,15 +3406,6 @@ public function migrations👷ListReposForOrgListing(): Internal\Operator\Migrat return $this->migrations👷ListReposForOrgListing; } - public function orgs👷ListOrganizationFineGrainedPermissions(): Internal\Operator\Orgs\ListOrganizationFineGrainedPermissions - { - if ($this->orgs👷ListOrganizationFineGrainedPermissions instanceof Internal\Operator\Orgs\ListOrganizationFineGrainedPermissions === false) { - $this->orgs👷ListOrganizationFineGrainedPermissions = new Internal\Operator\Orgs\ListOrganizationFineGrainedPermissions($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions()); - } - - return $this->orgs👷ListOrganizationFineGrainedPermissions; - } - public function orgs👷ListOrgRoles(): Internal\Operator\Orgs\ListOrgRoles { if ($this->orgs👷ListOrgRoles instanceof Internal\Operator\Orgs\ListOrgRoles === false) { @@ -3428,15 +3415,6 @@ public function orgs👷ListOrgRoles(): Internal\Operator\Orgs\ListOrgRoles return $this->orgs👷ListOrgRoles; } - public function orgs👷CreateCustomOrganizationRole(): Internal\Operator\Orgs\CreateCustomOrganizationRole - { - if ($this->orgs👷CreateCustomOrganizationRole instanceof Internal\Operator\Orgs\CreateCustomOrganizationRole === false) { - $this->orgs👷CreateCustomOrganizationRole = new Internal\Operator\Orgs\CreateCustomOrganizationRole($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()); - } - - return $this->orgs👷CreateCustomOrganizationRole; - } - public function orgs👷RevokeAllOrgRolesTeam(): Internal\Operator\Orgs\RevokeAllOrgRolesTeam { if ($this->orgs👷RevokeAllOrgRolesTeam instanceof Internal\Operator\Orgs\RevokeAllOrgRolesTeam === false) { @@ -3500,24 +3478,6 @@ public function orgs👷GetOrgRole(): Internal\Operator\Orgs\GetOrgRole return $this->orgs👷GetOrgRole; } - public function orgs👷DeleteCustomOrganizationRole(): Internal\Operator\Orgs\DeleteCustomOrganizationRole - { - if ($this->orgs👷DeleteCustomOrganizationRole instanceof Internal\Operator\Orgs\DeleteCustomOrganizationRole === false) { - $this->orgs👷DeleteCustomOrganizationRole = new Internal\Operator\Orgs\DeleteCustomOrganizationRole($this->browser, $this->authentication); - } - - return $this->orgs👷DeleteCustomOrganizationRole; - } - - public function orgs👷PatchCustomOrganizationRole(): Internal\Operator\Orgs\PatchCustomOrganizationRole - { - if ($this->orgs👷PatchCustomOrganizationRole instanceof Internal\Operator\Orgs\PatchCustomOrganizationRole === false) { - $this->orgs👷PatchCustomOrganizationRole = new Internal\Operator\Orgs\PatchCustomOrganizationRole($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles🌀RoleId()); - } - - return $this->orgs👷PatchCustomOrganizationRole; - } - public function orgs👷ListOrgRoleTeams(): Internal\Operator\Orgs\ListOrgRoleTeams { if ($this->orgs👷ListOrgRoleTeams instanceof Internal\Operator\Orgs\ListOrgRoleTeams === false) { diff --git a/clients/GitHub/src/Internal/Router/Delete/CodeSecurity.php b/clients/GitHub/src/Internal/Router/Delete/CodeSecurity.php index 05ed52f85bd..d12e4ca0673 100644 --- a/clients/GitHub/src/Internal/Router/Delete/CodeSecurity.php +++ b/clients/GitHub/src/Internal/Router/Delete/CodeSecurity.php @@ -19,6 +19,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } + /** @return */ public function detachConfiguration(array $params): WithoutBody { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Delete/Five.php b/clients/GitHub/src/Internal/Router/Delete/Five.php index 7b644023c09..e01b7d2a99b 100644 --- a/clients/GitHub/src/Internal/Router/Delete/Five.php +++ b/clients/GitHub/src/Internal/Router/Delete/Five.php @@ -79,12 +79,6 @@ public function call(string $call, array $params, array $pathChunks): WithoutBod return $this->routers->internal🔀Router🔀Delete🔀Orgs()->removeMembershipForUser($params); } } - } elseif ($pathChunks[3] === 'organization-roles') { - if ($pathChunks[4] === '{role_id}') { - if ($call === 'DELETE /orgs/{org}/organization-roles/{role_id}') { - return $this->routers->internal🔀Router🔀Delete🔀Orgs()->deleteCustomOrganizationRole($params); - } - } } elseif ($pathChunks[3] === 'outside_collaborators') { if ($pathChunks[4] === '{username}') { if ($call === 'DELETE /orgs/{org}/outside_collaborators/{username}') { diff --git a/clients/GitHub/src/Internal/Router/Delete/Orgs.php b/clients/GitHub/src/Internal/Router/Delete/Orgs.php index 3b0945c1a27..ee6c6e11fe1 100644 --- a/clients/GitHub/src/Internal/Router/Delete/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Delete/Orgs.php @@ -125,27 +125,6 @@ public function removeMembershipForUser(array $params): WithoutBody return $operator->call($arguments['org'], $arguments['username']); } - /** @return */ - public function deleteCustomOrganizationRole(array $params): WithoutBody - { - $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('role_id', $params) === false) { - throw new InvalidArgumentException('Missing mandatory field: role_id'); - } - - $arguments['role_id'] = $params['role_id']; - unset($params['role_id']); - $operator = new Internal\Operator\Orgs\DeleteCustomOrganizationRole($this->browser, $this->authentication); - - return $operator->call($arguments['org'], $arguments['role_id']); - } - /** @return */ public function removeOutsideCollaborator(array $params): WithoutBody { diff --git a/clients/GitHub/src/Internal/Router/Delete/Six.php b/clients/GitHub/src/Internal/Router/Delete/Six.php index 3be687de8b9..11e7028dcba 100644 --- a/clients/GitHub/src/Internal/Router/Delete/Six.php +++ b/clients/GitHub/src/Internal/Router/Delete/Six.php @@ -18,7 +18,6 @@ public function __construct(private Routers $routers) { } - /** @return |\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ public function call(string $call, array $params, array $pathChunks): WithoutBody|Ok|Json|ActionsCacheList|FileCommit { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Five.php b/clients/GitHub/src/Internal/Router/Get/Five.php index e144a5a840d..43dbafe3143 100644 --- a/clients/GitHub/src/Internal/Router/Get/Five.php +++ b/clients/GitHub/src/Internal/Router/Get/Five.php @@ -50,7 +50,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\CheckAutomatedSecurityFixes|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|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): HookDelivery|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|ActionsOrganizationPermissions|Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|OrgHook|OrgMembership|Migration|OrganizationRole|RepositoryRuleset|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHub\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHub\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Four.php b/clients/GitHub/src/Internal/Router/Get/Four.php index bf387f496f5..918bf81e676 100644 --- a/clients/GitHub/src/Internal/Router/Get/Four.php +++ b/clients/GitHub/src/Internal/Router/Get/Four.php @@ -34,7 +34,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|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @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|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): WebhookConfig|iterable|Installation|WithoutBody|GistSimple|GitignoreTemplate|MarketplacePurchase|Thread|Ok|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAppInstallations\Response\ApplicationJson\Ok|InteractionLimitResponse|One|\ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok|ProjectColumn|FullRepository|BasicError|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSecretsForAuthenticatedUser\Response\ApplicationJson\Ok|Codespace|GpgKey|Key|Migration|SshSigningKey|Hovercard|StarredRepository|Repository { if ($pathChunks[0] === '') { @@ -180,10 +180,6 @@ public function call(string $call, array $params, array $pathChunks): WebhookCon if ($call === 'GET /orgs/{org}/migrations') { return $this->routers->internal🔀Router🔀Get🔀Migrations()->listForOrg($params); } - } elseif ($pathChunks[3] === 'organization-fine-grained-permissions') { - if ($call === 'GET /orgs/{org}/organization-fine-grained-permissions') { - return $this->routers->internal🔀Router🔀Get🔀Orgs()->listOrganizationFineGrainedPermissions($params); - } } elseif ($pathChunks[3] === 'organization-roles') { if ($call === 'GET /orgs/{org}/organization-roles') { return $this->routers->internal🔀Router🔀Get🔀Orgs()->listOrgRoles($params); diff --git a/clients/GitHub/src/Internal/Router/Get/Orgs.php b/clients/GitHub/src/Internal/Router/Get/Orgs.php index f1c7d83e820..a2f65da9254 100644 --- a/clients/GitHub/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Get/Orgs.php @@ -271,21 +271,6 @@ public function listMembers(array $params): iterable return $operator->call($arguments['org'], $arguments['filter'], $arguments['role'], $arguments['per_page'], $arguments['page']); } - /** @return Observable */ - public function listOrganizationFineGrainedPermissions(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']); - $operator = new Internal\Operator\Orgs\ListOrganizationFineGrainedPermissions($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationFineGrainedPermissions()); - - return $operator->call($arguments['org']); - } - /** @return */ public function listOrgRoles(array $params): \ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok { diff --git a/clients/GitHub/src/Internal/Router/Get/Repos.php b/clients/GitHub/src/Internal/Router/Get/Repos.php index 008efed8db4..6aeb36cfb57 100644 --- a/clients/GitHub/src/Internal/Router/Get/Repos.php +++ b/clients/GitHub/src/Internal/Router/Get/Repos.php @@ -303,7 +303,7 @@ public function listForUser(array $params): iterable return $operator->call($arguments['username'], $arguments['direction'], $arguments['type'], $arguments['sort'], $arguments['per_page'], $arguments['page']); } - /** @return Observable */ + /** @return iterable */ public function getOrgRuleSuites(array $params): iterable { $arguments = []; @@ -313,6 +313,12 @@ public function getOrgRuleSuites(array $params): iterable $arguments['org'] = $params['org']; unset($params['org']); + if (array_key_exists('ref', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ref'); + } + + $arguments['ref'] = $params['ref']; + unset($params['ref']); if (array_key_exists('repository_name', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: repository_name'); } @@ -351,7 +357,7 @@ public function getOrgRuleSuites(array $params): iterable unset($params['page']); $operator = new Internal\Operator\Repos\GetOrgRuleSuites($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites()); - return $operator->call($arguments['org'], $arguments['repository_name'], $arguments['actor_name'], $arguments['time_period'], $arguments['rule_suite_result'], $arguments['per_page'], $arguments['page']); + return $operator->call($arguments['org'], $arguments['ref'], $arguments['repository_name'], $arguments['actor_name'], $arguments['time_period'], $arguments['rule_suite_result'], $arguments['per_page'], $arguments['page']); } /** @return */ @@ -465,6 +471,7 @@ public function listAutolinks(array $params): iterable return $operator->call($arguments['owner'], $arguments['repo']); } + /** @return */ public function checkAutomatedSecurityFixes(array $params): CheckAutomatedSecurityFixes|WithoutBody { $arguments = []; @@ -1817,7 +1824,7 @@ public function getRelease(array $params): Release|WithoutBody return $operator->call($arguments['owner'], $arguments['repo'], $arguments['release_id']); } - /** @return Observable */ + /** @return iterable */ public function getRepoRuleSuites(array $params): iterable { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index 305629bd5e2..535feecb60b 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -74,7 +74,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|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|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): Ok|iterable|ActionsCacheUsageOrgEnterprise|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|WithoutBody|CodeSecurityConfiguration|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|Json|CopilotSeatDetails|Package|OrgCustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\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|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Five.php b/clients/GitHub/src/Internal/Router/List/Five.php index 54dd93858a9..aa53259072c 100644 --- a/clients/GitHub/src/Internal/Router/List/Five.php +++ b/clients/GitHub/src/Internal/Router/List/Five.php @@ -16,7 +16,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Schema\BasicError|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|Observable|Observable */ + /** @return Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable|Observable|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|BasicError|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/List/Repos.php b/clients/GitHub/src/Internal/Router/List/Repos.php index 38d2cbf26e6..08a05aacc6d 100644 --- a/clients/GitHub/src/Internal/Router/List/Repos.php +++ b/clients/GitHub/src/Internal/Router/List/Repos.php @@ -253,7 +253,7 @@ public function listForUserListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable */ + /** @return iterable */ public function getOrgRuleSuitesListing(array $params): iterable { $arguments = []; @@ -263,6 +263,12 @@ public function getOrgRuleSuitesListing(array $params): iterable $arguments['org'] = $params['org']; unset($params['org']); + if (array_key_exists('ref', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: ref'); + } + + $arguments['ref'] = $params['ref']; + unset($params['ref']); if (array_key_exists('repository_name', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: repository_name'); } @@ -302,7 +308,7 @@ public function getOrgRuleSuitesListing(array $params): iterable $arguments['page'] = 1; do { $operator = new Internal\Operator\Repos\GetOrgRuleSuitesListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀Rulesets🌀RuleSuites()); - $items = [...$operator->call($arguments['org'], $arguments['repository_name'], $arguments['actor_name'], $arguments['time_period'], $arguments['rule_suite_result'], $arguments['per_page'], $arguments['page'])]; + $items = [...$operator->call($arguments['org'], $arguments['ref'], $arguments['repository_name'], $arguments['actor_name'], $arguments['time_period'], $arguments['rule_suite_result'], $arguments['per_page'], $arguments['page'])]; yield from $items; @@ -991,7 +997,7 @@ public function listPagesBuildsListing(array $params): iterable } while (count($items) > 0); } - /** @return Observable */ + /** @return iterable */ public function getRepoRuleSuitesListing(array $params): iterable { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/List/Six.php b/clients/GitHub/src/Internal/Router/List/Six.php index e2afcb66c84..c6a014790a7 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|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|iterable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|WithoutBody { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Patch/Five.php b/clients/GitHub/src/Internal/Router/Patch/Five.php index f1dd6e63e18..48f64a8b832 100644 --- a/clients/GitHub/src/Internal/Router/Patch/Five.php +++ b/clients/GitHub/src/Internal/Router/Patch/Five.php @@ -7,7 +7,6 @@ use ApiClients\Client\GitHub\Internal\Routers; use ApiClients\Client\GitHub\Schema\GistComment; use ApiClients\Client\GitHub\Schema\Import; -use ApiClients\Client\GitHub\Schema\OrganizationRole; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\OrgMembership; use ApiClients\Client\GitHub\Schema\ProjectCard; @@ -23,7 +22,7 @@ public function __construct(private Routers $routers) } /** @return |Observable */ - public function call(string $call, array $params, array $pathChunks): GistComment|OrgHook|OrganizationRole|iterable|WithoutBody|TeamFull|ProjectCard|Import|TeamDiscussion|OrgMembership + public function call(string $call, array $params, array $pathChunks): GistComment|OrgHook|iterable|WithoutBody|TeamFull|ProjectCard|Import|TeamDiscussion|OrgMembership { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'gists') { @@ -44,12 +43,6 @@ public function call(string $call, array $params, array $pathChunks): GistCommen return $this->routers->internal🔀Router🔀Patch🔀Orgs()->updateWebhook($params); } } - } elseif ($pathChunks[3] === 'organization-roles') { - if ($pathChunks[4] === '{role_id}') { - if ($call === 'PATCH /orgs/{org}/organization-roles/{role_id}') { - return $this->routers->internal🔀Router🔀Patch🔀Orgs()->patchCustomOrganizationRole($params); - } - } } elseif ($pathChunks[3] === 'properties') { if ($pathChunks[4] === 'schema') { if ($call === 'PATCH /orgs/{org}/properties/schema') { diff --git a/clients/GitHub/src/Internal/Router/Patch/Orgs.php b/clients/GitHub/src/Internal/Router/Patch/Orgs.php index 927674117d1..09ee510a16b 100644 --- a/clients/GitHub/src/Internal/Router/Patch/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Patch/Orgs.php @@ -7,7 +7,6 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema; use ApiClients\Client\GitHub\Schema\OrganizationFull; -use ApiClients\Client\GitHub\Schema\OrganizationRole; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\OrgMembership; use ApiClients\Client\GitHub\Schema\WebhookConfig; @@ -61,27 +60,6 @@ public function updateWebhook(array $params): OrgHook return $operator->call($arguments['org'], $arguments['hook_id'], $params); } - /** @return */ - public function patchCustomOrganizationRole(array $params): OrganizationRole - { - $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('role_id', $params) === false) { - throw new InvalidArgumentException('Missing mandatory field: role_id'); - } - - $arguments['role_id'] = $params['role_id']; - unset($params['role_id']); - $operator = new Internal\Operator\Orgs\PatchCustomOrganizationRole($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles🌀RoleId()); - - return $operator->call($arguments['org'], $arguments['role_id'], $params); - } - /** @return Observable */ public function createOrUpdateCustomProperties(array $params): iterable { diff --git a/clients/GitHub/src/Internal/Router/Post/Four.php b/clients/GitHub/src/Internal/Router/Post/Four.php index 7ae5c9dcc44..b50a6ba6275 100644 --- a/clients/GitHub/src/Internal/Router/Post/Four.php +++ b/clients/GitHub/src/Internal/Router/Post/Four.php @@ -13,7 +13,6 @@ use ApiClients\Client\GitHub\Schema\Migration; use ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHub\Schema\OrganizationInvitation; -use ApiClients\Client\GitHub\Schema\OrganizationRole; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Client\GitHub\Schema\Project; use ApiClients\Client\GitHub\Schema\ProjectColumn; @@ -29,7 +28,7 @@ public function __construct(private Routers $routers) { } - public function call(string $call, array $params, array $pathChunks): Integration|Authorization|GistComment|WithoutBody|BaseGist|OrgHook|OrganizationInvitation|Migration|OrganizationRole|Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|Project|FullRepository|RepositoryRuleset|TeamFull|ProjectColumn|TeamDiscussion + public function call(string $call, array $params, array $pathChunks): Integration|Authorization|GistComment|WithoutBody|BaseGist|OrgHook|OrganizationInvitation|Migration|Json|\ApiClients\Client\GitHub\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|Project|FullRepository|RepositoryRuleset|TeamFull|ProjectColumn|TeamDiscussion { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'app-manifests') { @@ -74,10 +73,6 @@ public function call(string $call, array $params, array $pathChunks): Integratio if ($call === 'POST /orgs/{org}/migrations') { return $this->routers->internal🔀Router🔀Post🔀Migrations()->startForOrg($params); } - } elseif ($pathChunks[3] === 'organization-roles') { - if ($call === 'POST /orgs/{org}/organization-roles') { - return $this->routers->internal🔀Router🔀Post🔀Orgs()->createCustomOrganizationRole($params); - } } elseif ($pathChunks[3] === 'personal-access-token-requests') { if ($call === 'POST /orgs/{org}/personal-access-token-requests') { return $this->routers->internal🔀Router🔀Post🔀Orgs()->reviewPatGrantRequestsInBulk($params); diff --git a/clients/GitHub/src/Internal/Router/Post/Orgs.php b/clients/GitHub/src/Internal/Router/Post/Orgs.php index f6f27488bdc..ff0afd058ed 100644 --- a/clients/GitHub/src/Internal/Router/Post/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Post/Orgs.php @@ -7,7 +7,6 @@ use ApiClients\Client\GitHub\Internal; use ApiClients\Client\GitHub\Schema\Operations\Orgs\ReviewPatGrantRequestsInBulk\Response\ApplicationJson\Accepted\Application\Json; use ApiClients\Client\GitHub\Schema\OrganizationInvitation; -use ApiClients\Client\GitHub\Schema\OrganizationRole; use ApiClients\Client\GitHub\Schema\OrgHook; use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface; use ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody; @@ -53,21 +52,6 @@ public function createInvitation(array $params): OrganizationInvitation return $operator->call($arguments['org'], $params); } - /** @return */ - public function createCustomOrganizationRole(array $params): OrganizationRole - { - $arguments = []; - if (array_key_exists('org', $params) === false) { - throw new InvalidArgumentException('Missing mandatory field: org'); - } - - $arguments['org'] = $params['org']; - unset($params['org']); - $operator = new Internal\Operator\Orgs\CreateCustomOrganizationRole($this->browser, $this->authentication, $this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Orgs🌀Org🌀OrganizationRoles()); - - return $operator->call($arguments['org'], $params); - } - /** @return */ public function reviewPatGrantRequestsInBulk(array $params): Json { diff --git a/clients/GitHub/src/Operation/CodeSecurity.php b/clients/GitHub/src/Operation/CodeSecurity.php index dc21e5cc53f..97c48a33108 100644 --- a/clients/GitHub/src/Operation/CodeSecurity.php +++ b/clients/GitHub/src/Operation/CodeSecurity.php @@ -35,6 +35,7 @@ public function getDefaultConfigurations(string $org): iterable|WithoutBody return $this->operators->codeSecurity👷GetDefaultConfigurations()->call($org); } + /** @return */ public function detachConfiguration(string $org, array $params): WithoutBody { return $this->operators->codeSecurity👷DetachConfiguration()->call($org, $params); diff --git a/clients/GitHub/src/Operation/Orgs.php b/clients/GitHub/src/Operation/Orgs.php index f73e89deb73..02c168f9889 100644 --- a/clients/GitHub/src/Operation/Orgs.php +++ b/clients/GitHub/src/Operation/Orgs.php @@ -252,24 +252,12 @@ public function removeMembershipForUser(string $org, string $username): WithoutB return $this->operators->orgs👷RemoveMembershipForUser()->call($org, $username); } - /** @return Observable */ - public function listOrganizationFineGrainedPermissions(string $org): iterable - { - return $this->operators->orgs👷ListOrganizationFineGrainedPermissions()->call($org); - } - /** @return */ public function listOrgRoles(string $org): \ApiClients\Client\GitHub\Schema\Operations\Orgs\ListOrgRoles\Response\ApplicationJson\Ok { return $this->operators->orgs👷ListOrgRoles()->call($org); } - /** @return */ - public function createCustomOrganizationRole(string $org, array $params): OrganizationRole - { - return $this->operators->orgs👷CreateCustomOrganizationRole()->call($org, $params); - } - /** @return */ public function revokeAllOrgRolesTeam(string $org, string $teamSlug): WithoutBody { @@ -312,18 +300,6 @@ public function getOrgRole(string $org, int $roleId): OrganizationRole return $this->operators->orgs👷GetOrgRole()->call($org, $roleId); } - /** @return */ - public function deleteCustomOrganizationRole(string $org, int $roleId): WithoutBody - { - return $this->operators->orgs👷DeleteCustomOrganizationRole()->call($org, $roleId); - } - - /** @return */ - public function patchCustomOrganizationRole(string $org, int $roleId, array $params): OrganizationRole - { - return $this->operators->orgs👷PatchCustomOrganizationRole()->call($org, $roleId, $params); - } - /** @return Observable|WithoutBody */ public function listOrgRoleTeams(string $org, int $roleId, int $perPage, int $page): iterable|WithoutBody { diff --git a/clients/GitHub/src/Operation/Repos.php b/clients/GitHub/src/Operation/Repos.php index f26c0ea58b7..2c1bf12989c 100644 --- a/clients/GitHub/src/Operation/Repos.php +++ b/clients/GitHub/src/Operation/Repos.php @@ -107,16 +107,16 @@ public function createOrgRuleset(string $org, array $params): RepositoryRuleset return $this->operators->repos👷CreateOrgRuleset()->call($org, $params); } - /** @return Observable */ - public function getOrgRuleSuites(string $org, int $repositoryName, string $actorName, string $timePeriod, string $ruleSuiteResult, int $perPage, int $page): iterable + /** @return iterable */ + public function getOrgRuleSuites(string $org, string $ref, int $repositoryName, string $actorName, string $timePeriod, string $ruleSuiteResult, int $perPage, int $page): iterable { - return $this->operators->repos👷GetOrgRuleSuites()->call($org, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); + return $this->operators->repos👷GetOrgRuleSuites()->call($org, $ref, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); } - /** @return Observable */ - public function getOrgRuleSuitesListing(string $org, int $repositoryName, string $actorName, string $timePeriod, string $ruleSuiteResult, int $perPage, int $page): iterable + /** @return iterable */ + public function getOrgRuleSuitesListing(string $org, string $ref, int $repositoryName, string $actorName, string $timePeriod, string $ruleSuiteResult, int $perPage, int $page): iterable { - return $this->operators->repos👷GetOrgRuleSuitesListing()->call($org, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); + return $this->operators->repos👷GetOrgRuleSuitesListing()->call($org, $ref, $repositoryName, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); } /** @return */ @@ -203,6 +203,7 @@ public function deleteAutolink(string $owner, string $repo, int $autolinkId): Wi return $this->operators->repos👷DeleteAutolink()->call($owner, $repo, $autolinkId); } + /** @return */ public function checkAutomatedSecurityFixes(string $owner, string $repo): CheckAutomatedSecurityFixes|WithoutBody { return $this->operators->repos👷CheckAutomatedSecurityFixes()->call($owner, $repo); @@ -1180,13 +1181,13 @@ public function createRepoRuleset(string $owner, string $repo, array $params): R return $this->operators->repos👷CreateRepoRuleset()->call($owner, $repo, $params); } - /** @return Observable */ + /** @return iterable */ public function getRepoRuleSuites(string $owner, string $repo, string $ref, string $actorName, string $timePeriod, string $ruleSuiteResult, int $perPage, int $page): iterable { return $this->operators->repos👷GetRepoRuleSuites()->call($owner, $repo, $ref, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); } - /** @return Observable */ + /** @return iterable */ public function getRepoRuleSuitesListing(string $owner, string $repo, string $ref, string $actorName, string $timePeriod, string $ruleSuiteResult, int $perPage, int $page): iterable { return $this->operators->repos👷GetRepoRuleSuitesListing()->call($owner, $repo, $ref, $actorName, $timePeriod, $ruleSuiteResult, $perPage, $page); diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 266396296bd..47ba0df2ee9 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -696,7 +696,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'DELETE /orgs/{org}/code-security/configurations/detach') { - return $this->typeResolver->resolve('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}/code-security/configurations/{configuration_id}') { @@ -1051,18 +1051,10 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve('Observable'); } - if ($call === 'GET /orgs/{org}/organization-fine-grained-permissions') { - return $this->typeResolver->resolve('Observable'); - } - if ($call === 'GET /orgs/{org}/organization-roles') { return $this->typeResolver->resolve(''); } - if ($call === 'POST /orgs/{org}/organization-roles') { - return $this->typeResolver->resolve(''); - } - if ($call === 'DELETE /orgs/{org}/organization-roles/teams/{team_slug}') { return $this->typeResolver->resolve(''); } @@ -1091,14 +1083,6 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } - if ($call === 'DELETE /orgs/{org}/organization-roles/{role_id}') { - return $this->typeResolver->resolve(''); - } - - if ($call === 'PATCH /orgs/{org}/organization-roles/{role_id}') { - return $this->typeResolver->resolve(''); - } - if ($call === 'GET /orgs/{org}/organization-roles/{role_id}/teams') { return $this->typeResolver->resolve('Observable|WithoutBody'); } @@ -1308,11 +1292,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/rulesets/rule-suites') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /orgs/{org}/rulesets/rule-suites') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}') { @@ -2000,7 +1984,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/automated-security-fixes') { - return $this->typeResolver->resolve('Schema\\CheckAutomatedSecurityFixes|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve(''); } if ($call === 'PUT /repos/{owner}/{repo}/automated-security-fixes') { @@ -3448,11 +3432,11 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/rulesets/rule-suites') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'LIST /repos/{owner}/{repo}/rulesets/rule-suites') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}') { diff --git a/clients/GitHub/src/Schema/Environment.php b/clients/GitHub/src/Schema/Environment.php index 3800da24ec9..1b9bbcaa218 100644 --- a/clients/GitHub/src/Schema/Environment.php +++ b/clients/GitHub/src/Schema/Environment.php @@ -25,6 +25,7 @@ "id": { "type": "integer", "description": "The id of the environment.", + "format": "int64", "examples": [ 56780428 ] diff --git a/clients/GitHub/src/Schema/Git/CreateCommit/Request/ApplicationJson.php b/clients/GitHub/src/Schema/Git/CreateCommit/Request/ApplicationJson.php index 7941eb1e25d..960d4f8e298 100644 --- a/clients/GitHub/src/Schema/Git/CreateCommit/Request/ApplicationJson.php +++ b/clients/GitHub/src/Schema/Git/CreateCommit/Request/ApplicationJson.php @@ -28,7 +28,7 @@ "items": { "type": "string" }, - "description": "The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided." + "description": "The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided." }, "author": { "required": [ @@ -103,7 +103,7 @@ /** * message: The commit message * tree: The SHA of the tree object this commit points to - * parents: The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + * parents: The full SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. * author: Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. * committer: Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. * signature: The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. diff --git a/clients/GitHub/src/Schema/Operations/Repos/GetAllEnvironments/Response/ApplicationJson/Ok.php b/clients/GitHub/src/Schema/Operations/Repos/GetAllEnvironments/Response/ApplicationJson/Ok.php index 6cff2027af8..008fb504019 100644 --- a/clients/GitHub/src/Schema/Operations/Repos/GetAllEnvironments/Response/ApplicationJson/Ok.php +++ b/clients/GitHub/src/Schema/Operations/Repos/GetAllEnvironments/Response/ApplicationJson/Ok.php @@ -36,6 +36,7 @@ "id": { "type": "integer", "description": "The id of the environment.", + "format": "int64", "examples": [ 56780428 ] diff --git a/clients/GitHub/src/Schema/OrganizationFineGrainedPermission.php b/clients/GitHub/src/Schema/OrganizationFineGrainedPermission.php deleted file mode 100644 index 7955eb172e2..00000000000 --- a/clients/GitHub/src/Schema/OrganizationFineGrainedPermission.php +++ /dev/null @@ -1,36 +0,0 @@ - 'application/json'], json_encode(json_decode(Schema\OrganizationRole::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\CreateCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - - return $data; - })(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_201_requestContentType_application_json_responseContentType_application_json_zero(): void - { - $response = new Response(201, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\OrganizationRole::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } - - /** @test */ - public function call_httpCode_422_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\ValidationError::class); - $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\CreateCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - - return $data; - })(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_422_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\ValidationError::class); - $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } - - /** @test */ - public function call_httpCode_404_requestContentType_application_json_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('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\CreateCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - - return $data; - })(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_404_requestContentType_application_json_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('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } - - /** @test */ - public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\BasicError::class); - $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\CreateCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - - return $data; - })(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\BasicError::class); - $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } -} diff --git a/clients/GitHub/tests/Internal/Operation/Orgs/ListOrganizationFineGrainedPermissionsTest.php b/clients/GitHub/tests/Internal/Operation/Orgs/ListOrganizationFineGrainedPermissionsTest.php deleted file mode 100644 index 35076eb13ad..00000000000 --- a/clients/GitHub/tests/Internal/Operation/Orgs/ListOrganizationFineGrainedPermissionsTest.php +++ /dev/null @@ -1,91 +0,0 @@ - '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/organization-fine-grained-permissions', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\ListOrganizationFineGrainedPermissions::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - - 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/organization-fine-grained-permissions', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listOrganizationFineGrainedPermissions('generated'); - } - - /** @test */ - public function call_httpCode_422_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\ValidationError::class); - $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::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/organization-fine-grained-permissions', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\ListOrganizationFineGrainedPermissions::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - - return $data; - })([])); - } - - /** @test */ - public function operations_httpCode_422_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\ValidationError::class); - $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::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/organization-fine-grained-permissions', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->listOrganizationFineGrainedPermissions('generated'); - } -} diff --git a/clients/GitHub/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php b/clients/GitHub/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php deleted file mode 100644 index e7bb09d91a6..00000000000 --- a/clients/GitHub/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php +++ /dev/null @@ -1,161 +0,0 @@ - 'application/json'], json_encode(json_decode(Schema\OrganizationRole::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('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\PatchCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - $data['role_id'] = 7; - - return $data; - })(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_200_requestContentType_application_json_responseContentType_application_json_zero(): void - { - $response = new Response(200, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\OrganizationRole::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('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } - - /** @test */ - public function call_httpCode_422_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\ValidationError::class); - $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::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('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\PatchCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - $data['role_id'] = 7; - - return $data; - })(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_422_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\ValidationError::class); - $response = new Response(422, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\ValidationError::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('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } - - /** @test */ - public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\BasicError::class); - $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\PatchCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - $data['role_id'] = 7; - - return $data; - })(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void - { - self::expectException(ErrorSchemas\BasicError::class); - $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); - $auth = $this->prophesize(AuthenticationInterface::class); - $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); - $browser = $this->prophesize(Browser::class); - $browser->withBase(Argument::any())->willReturn($browser->reveal()); - $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } - - /** @test */ - public function call_httpCode_404_requestContentType_application_json_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('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->call(Internal\Operation\Orgs\PatchCustomOrganizationRole::OPERATION_MATCH, (static function (array $data): array { - $data['org'] = 'generated'; - $data['role_id'] = 7; - - return $data; - })(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); - } - - /** @test */ - public function operations_httpCode_404_requestContentType_application_json_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('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); - $client = new Client($auth->reveal(), $browser->reveal()); - $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); - } -} diff --git a/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesListingTest.php b/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesListingTest.php index d25629b653d..0be75f7eb7a 100644 --- a/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesListingTest.php +++ b/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesListingTest.php @@ -31,10 +31,11 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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\GetOrgRuleSuitesListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; + $data['ref'] = 'generated'; $data['repository_name'] = 15; $data['actor_name'] = 'generated'; $data['time_period'] = 'generated'; @@ -58,9 +59,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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()->getOrgRuleSuitesListing('generated', 15, 'generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->repos()->getOrgRuleSuitesListing('generated', 'generated', 15, 'generated', 'generated', 'generated', 8, 1); foreach ($result as $item) { } } @@ -75,10 +76,11 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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\GetOrgRuleSuitesListing::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; + $data['ref'] = 'generated'; $data['repository_name'] = 15; $data['actor_name'] = 'generated'; $data['time_period'] = 'generated'; @@ -102,9 +104,9 @@ public function operations_httpCode_500_responseContentType_application_json_zer $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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()->getOrgRuleSuitesListing('generated', 15, 'generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->repos()->getOrgRuleSuitesListing('generated', 'generated', 15, 'generated', 'generated', 'generated', 8, 1); foreach ($result as $item) { } } diff --git a/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesTest.php b/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesTest.php index 3adb74d68e0..4c1e180cb3c 100644 --- a/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesTest.php +++ b/clients/GitHub/tests/Internal/Operation/Repos/GetOrgRuleSuitesTest.php @@ -31,10 +31,11 @@ public function call_httpCode_404_responseContentType_application_json_zero(): v $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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\GetOrgRuleSuites::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; + $data['ref'] = 'generated'; $data['repository_name'] = 15; $data['actor_name'] = 'generated'; $data['time_period'] = 'generated'; @@ -56,9 +57,9 @@ public function operations_httpCode_404_responseContentType_application_json_zer $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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()->getOrgRuleSuites('generated', 15, 'generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->repos()->getOrgRuleSuites('generated', 'generated', 15, 'generated', 'generated', 'generated', 8, 1); } /** @test */ @@ -71,10 +72,11 @@ public function call_httpCode_500_responseContentType_application_json_zero(): v $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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\GetOrgRuleSuites::OPERATION_MATCH, (static function (array $data): array { $data['org'] = 'generated'; + $data['ref'] = 'generated'; $data['repository_name'] = 15; $data['actor_name'] = 'generated'; $data['time_period'] = 'generated'; @@ -96,8 +98,8 @@ public function operations_httpCode_500_responseContentType_application_json_zer $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/rule-suites?repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/orgs/generated/rulesets/rule-suites?ref=generated&repository_name=15&actor_name=generated&time_period=generated&rule_suite_result=generated&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()->getOrgRuleSuites('generated', 15, 'generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->repos()->getOrgRuleSuites('generated', 'generated', 15, 'generated', 'generated', 'generated', 8, 1); } } diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 8d87a2fc7ec..0a7820b0098 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -180,7 +180,7 @@ function authHeader(): string assertType('Observable', $client->call('GET /orgs/{org}/code-security/configurations')); assertType('', $client->call('POST /orgs/{org}/code-security/configurations')); assertType('Observable|WithoutBody', $client->call('GET /orgs/{org}/code-security/configurations/defaults')); -assertType('\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('DELETE /orgs/{org}/code-security/configurations/detach')); +assertType('', $client->call('DELETE /orgs/{org}/code-security/configurations/detach')); assertType('', $client->call('GET /orgs/{org}/code-security/configurations/{configuration_id}')); assertType('', $client->call('DELETE /orgs/{org}/code-security/configurations/{configuration_id}')); assertType('', $client->call('PATCH /orgs/{org}/code-security/configurations/{configuration_id}')); @@ -269,9 +269,7 @@ function authHeader(): string assertType('', $client->call('DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock')); assertType('Observable', $client->call('GET /orgs/{org}/migrations/{migration_id}/repositories')); assertType('Observable', $client->call('LIST /orgs/{org}/migrations/{migration_id}/repositories')); -assertType('Observable', $client->call('GET /orgs/{org}/organization-fine-grained-permissions')); assertType('', $client->call('GET /orgs/{org}/organization-roles')); -assertType('', $client->call('POST /orgs/{org}/organization-roles')); assertType('', $client->call('DELETE /orgs/{org}/organization-roles/teams/{team_slug}')); assertType('', $client->call('PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}')); assertType('', $client->call('DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}')); @@ -279,8 +277,6 @@ function authHeader(): string assertType('', $client->call('PUT /orgs/{org}/organization-roles/users/{username}/{role_id}')); assertType('', $client->call('DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}')); assertType('', $client->call('GET /orgs/{org}/organization-roles/{role_id}')); -assertType('', $client->call('DELETE /orgs/{org}/organization-roles/{role_id}')); -assertType('', $client->call('PATCH /orgs/{org}/organization-roles/{role_id}')); assertType('Observable|WithoutBody', $client->call('GET /orgs/{org}/organization-roles/{role_id}/teams')); assertType('Observable|WithoutBody', $client->call('LIST /orgs/{org}/organization-roles/{role_id}/teams')); assertType('Observable|WithoutBody', $client->call('GET /orgs/{org}/organization-roles/{role_id}/users')); @@ -333,8 +329,8 @@ function authHeader(): string assertType('Observable', $client->call('GET /orgs/{org}/rulesets')); assertType('Observable', $client->call('LIST /orgs/{org}/rulesets')); assertType('', $client->call('POST /orgs/{org}/rulesets')); -assertType('Observable', $client->call('GET /orgs/{org}/rulesets/rule-suites')); -assertType('Observable', $client->call('LIST /orgs/{org}/rulesets/rule-suites')); +assertType('iterable', $client->call('GET /orgs/{org}/rulesets/rule-suites')); +assertType('iterable', $client->call('LIST /orgs/{org}/rulesets/rule-suites')); assertType('', $client->call('GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}')); assertType('', $client->call('GET /orgs/{org}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /orgs/{org}/rulesets/{ruleset_id}')); @@ -506,7 +502,7 @@ function authHeader(): string assertType('', $client->call('POST /repos/{owner}/{repo}/autolinks')); assertType('', $client->call('GET /repos/{owner}/{repo}/autolinks/{autolink_id}')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}')); -assertType('Schema\\CheckAutomatedSecurityFixes|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /repos/{owner}/{repo}/automated-security-fixes')); +assertType('', $client->call('GET /repos/{owner}/{repo}/automated-security-fixes')); assertType('', $client->call('PUT /repos/{owner}/{repo}/automated-security-fixes')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/automated-security-fixes')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/branches')); @@ -868,8 +864,8 @@ function authHeader(): string assertType('Observable', $client->call('GET /repos/{owner}/{repo}/rulesets')); assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/rulesets')); assertType('', $client->call('POST /repos/{owner}/{repo}/rulesets')); -assertType('Observable', $client->call('GET /repos/{owner}/{repo}/rulesets/rule-suites')); -assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/rulesets/rule-suites')); +assertType('iterable', $client->call('GET /repos/{owner}/{repo}/rulesets/rule-suites')); +assertType('iterable', $client->call('LIST /repos/{owner}/{repo}/rulesets/rule-suites')); assertType('', $client->call('GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}')); assertType('', $client->call('GET /repos/{owner}/{repo}/rulesets/{ruleset_id}')); assertType('', $client->call('PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 71c188b816f..80f487e6900 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -10219,54 +10219,11 @@ paths: enabledForGitHubApps: false category: migrations subcategory: orgs - "/orgs/{org}/organization-fine-grained-permissions": - get: - summary: List organization fine-grained permissions for an organization - description: |- - Lists the fine-grained permissions that can be used in custom organization roles for an organization. For more information, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - - To list the fine-grained permissions that can be used in custom repository roles for an organization, see "[List repository fine-grained permissions for an organization](https://docs.github.com/rest/orgs/organization-roles#list-repository-fine-grained-permissions-for-an-organization)." - - To use this endpoint, the authenticated user must be one of: - - - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `read_organization_custom_org_role` in the organization. - - OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - tags: - - orgs - operationId: orgs/list-organization-fine-grained-permissions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/orgs/organization-roles#list-organization-fine-grained-permissions-for-an-organization - parameters: - - "$ref": "#/components/parameters/org" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/organization-fine-grained-permission" - examples: - default: - "$ref": "#/components/examples/organization-fine-grained-permission-example" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: organization-roles "/orgs/{org}/organization-roles": get: summary: Get all organization roles for an organization description: |- - Lists the organization roles available in this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." To use this endpoint, the authenticated user must be one of: @@ -10311,106 +10268,11 @@ paths: enabledForGitHubApps: true category: orgs subcategory: organization-roles - post: - summary: Create a custom organization role - description: |- - Creates a custom organization role that can be assigned to users and teams, granting them specific permissions over the organization. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - - To use this endpoint, the authenticated user must be one of: - - - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - - OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - tags: - - orgs - operationId: orgs/create-custom-organization-role - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/orgs/organization-roles#create-a-custom-organization-role - parameters: - - "$ref": "#/components/parameters/org" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the custom role. - description: - type: string - description: A short description about the intended usage of this - role or what permissions it grants. - permissions: - type: array - description: A list of additional permissions included in this role. - items: - type: string - required: - - name - - permissions - examples: - default: - value: - name: Custom Role Manager - description: Permissions to manage custom roles within an org - permissions: - - write_organization_custom_repo_role - - write_organization_custom_org_role - - read_organization_custom_repo_role - - read_organization_custom_org_role - responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/organization-role" - examples: - default: - value: - id: 8030 - name: Custom Role Manager - description: Permissions to manage custom roles within an org - permissions: - - write_organization_custom_repo_role - - write_organization_custom_org_role - - read_organization_custom_repo_role - - read_organization_custom_org_role - organization: - login: github - id: 1 - node_id: MDEyOk9yZ2FuaXphdGlvbjE= - url: https://api.github.com/orgs/github - repos_url: https://api.github.com/orgs/github/repos - events_url: https://api.github.com/orgs/github/events - hooks_url: https://api.github.com/orgs/github/hooks - issues_url: https://api.github.com/orgs/github/issues - members_url: https://api.github.com/orgs/github/members{/member} - public_members_url: https://api.github.com/orgs/github/public_members{/member} - avatar_url: https://github.com/images/error/octocat_happy.gif - description: A great organization - created_at: '2022-07-04T22:19:11Z' - updated_at: '2022-07-04T22:19:11Z' - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" - '409': - "$ref": "#/components/responses/conflict" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: organization-roles "/orgs/{org}/organization-roles/teams/{team_slug}": delete: summary: Remove all organization roles for a team description: |- - Removes all assigned organization roles from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." The authenticated user must be an administrator for the organization to use this endpoint. @@ -10436,7 +10298,7 @@ paths: put: summary: Assign an organization role to a team description: |- - Assigns an organization role to a team in an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." The authenticated user must be an administrator for the organization to use this endpoint. @@ -10467,7 +10329,7 @@ paths: delete: summary: Remove an organization role from a team description: |- - Removes an organization role from a team. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." The authenticated user must be an administrator for the organization to use this endpoint. @@ -10494,7 +10356,7 @@ paths: delete: summary: Remove all organization roles for a user description: |- - Revokes all assigned organization roles from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." The authenticated user must be an administrator for the organization to use this endpoint. @@ -10520,7 +10382,7 @@ paths: put: summary: Assign an organization role to a user description: |- - Assigns an organization role to a member of an organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." The authenticated user must be an administrator for the organization to use this endpoint. @@ -10552,7 +10414,7 @@ paths: delete: summary: Remove an organization role from a user description: |- - Remove an organization role from a user. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." The authenticated user must be an administrator for the organization to use this endpoint. @@ -10579,7 +10441,7 @@ paths: get: summary: Get an organization role description: |- - Gets an organization role that is available to this organization. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." To use this endpoint, the authenticated user must be one of: @@ -10615,127 +10477,11 @@ paths: enabledForGitHubApps: true category: orgs subcategory: organization-roles - patch: - summary: Update a custom organization role - description: |- - Updates an existing custom organization role. Permission changes will apply to all assignees. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - - - To use this endpoint, the authenticated user must be one of: - - - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - - OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - tags: - - orgs - operationId: orgs/patch-custom-organization-role - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/orgs/organization-roles#update-a-custom-organization-role - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/role-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the custom role. - description: - type: string - description: A short description about the intended usage of this - role or what permissions it grants. - permissions: - type: array - description: A list of additional permissions included in this role. - items: - type: string - examples: - default: - value: - description: Permissions to manage custom roles within an org. - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/organization-role" - examples: - default: - value: - id: 8030 - name: Custom Role Manager - description: Permissions to manage custom roles within an org - permissions: - - write_organization_custom_repo_role - - write_organization_custom_org_role - - read_organization_custom_repo_role - - read_organization_custom_org_role - organization: - login: github - id: 1 - node_id: MDEyOk9yZ2FuaXphdGlvbjE= - url: https://api.github.com/orgs/github - repos_url: https://api.github.com/orgs/github/repos - events_url: https://api.github.com/orgs/github/events - hooks_url: https://api.github.com/orgs/github/hooks - issues_url: https://api.github.com/orgs/github/issues - members_url: https://api.github.com/orgs/github/members{/member} - public_members_url: https://api.github.com/orgs/github/public_members{/member} - avatar_url: https://github.com/images/error/octocat_happy.gif - description: A great organization - created_at: '2022-07-04T22:19:11Z' - updated_at: '2022-07-04T22:19:11Z' - '422': - "$ref": "#/components/responses/validation_failed" - '409': - "$ref": "#/components/responses/conflict" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: organization-roles - delete: - summary: Delete a custom organization role. - description: |- - Deletes a custom organization role. For more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." - - To use this endpoint, the authenticated user must be one of: - - - An administrator for the organization. - - A user, or a user on a team, with the fine-grained permissions of `write_organization_custom_org_role` in the organization. - - OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. - tags: - - orgs - operationId: orgs/delete-custom-organization-role - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/orgs/organization-roles#delete-a-custom-organization-role - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/role-id" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: organization-roles "/orgs/{org}/organization-roles/{role_id}/teams": get: summary: List teams that are assigned to an organization role description: |- - Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." To use this endpoint, you must be an administrator for the organization. @@ -10781,7 +10527,7 @@ paths: get: summary: List users that are assigned to an organization role description: |- - Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)." To use this endpoint, you must be an administrator for the organization. @@ -12787,6 +12533,7 @@ paths: url: https://docs.github.com/rest/orgs/rule-suites#list-organization-rule-suites parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/ref-in-query" - "$ref": "#/components/parameters/repository-name-in-query" - "$ref": "#/components/parameters/time-period" - "$ref": "#/components/parameters/actor-name-in-query" @@ -27788,7 +27535,9 @@ paths: get: summary: List custom deployment rule integrations available for an environment description: |- - Gets all custom deployment protection rule integrations that are available for an environment. Anyone with read access to the repository can use this endpoint. + Gets all custom deployment protection rule integrations that are available for an environment. + + The authenticated user must have admin or owner permissions to the repository to use this endpoint. For more information about environments, see "[Using environments for deployment](https://docs.github.com/actions/deployment/targeting-different-environments/using-environments-for-deployment)." @@ -28634,10 +28383,11 @@ paths: description: The SHA of the tree object this commit points to parents: type: array - description: The SHAs of the commits that were the parents of this - commit. If omitted or empty, the commit will be written as a root - commit. For a single parent, an array of one SHA should be provided; - for a merge commit, an array of more than one should be provided. + description: The full SHAs of the commits that were the parents + of this commit. If omitted or empty, the commit will be written + as a root commit. For a single parent, an array of one SHA should + be provided; for a merge commit, an array of more than one should + be provided. items: type: string author: @@ -72128,18 +71878,6 @@ components: - url - created_at - updated_at - organization-fine-grained-permission: - title: Organization Fine-Grained Permission - description: A fine-grained permission that protects organization resources. - type: object - properties: - name: - type: string - description: - type: string - required: - - name - - description organization-role: title: Organization Role description: Organization roles @@ -82002,6 +81740,7 @@ components: id: description: The id of the environment. type: integer + format: int64 examples: - 56780428 node_id: @@ -203257,12 +202996,6 @@ components: status: disabled secret_scanning_non_provider_patterns: status: disabled - organization-fine-grained-permission-example: - value: - - name: read_organization_custom_org_role - description: View organization roles - - name: write_organization_custom_org_role - description: Manage custom organization roles organization-role-list: value: total_count: 2 @@ -222867,6 +222600,18 @@ components: required: true schema: type: string + ref-in-query: + name: ref + description: 'The name of the ref. Cannot contain wildcard characters. Optionally + prefix with `refs/heads/` to limit to branches or `refs/tags/` to limit to + tags. Omit the prefix to search across all refs. When specified, only rule + evaluations triggered for this ref will be returned. + + ' + in: query + schema: + type: string + x-multi-segment: true repository-name-in-query: name: repository_name description: The name of the repository to filter on. When specified, only rule @@ -223397,14 +223142,6 @@ components: required: true schema: type: integer - ref-in-query: - name: ref - description: The name of the ref. Cannot contain wildcard characters. When specified, - only rule evaluations triggered for this ref will be returned. - in: query - schema: - type: string - x-multi-segment: true tag-protection-id: name: tag_protection_id description: The unique identifier of the tag protection.