diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index 07dbfc4e399..dc04cbbf57a 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "7deddf9e4aa09fc616db5959c95d3f00", + "specHash": "1361f78292c83f6e3e25de0a25ba1a99", "generatedFiles": { "files": [ { @@ -636,7 +636,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRulesetBypassActor.php", - "hash": "5516dc5c5dca8834aec7abcc304a57b8" + "hash": "da5558c25d72365e22f30e3ebdf01c3a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRulesetConditions.php", @@ -716,7 +716,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset.php", - "hash": "ecc2440adece9a4ec03e34487f2e7749" + "hash": "6ee659e0f0495addd089ee78553a9686" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/GroupMapping.php", @@ -4928,11 +4928,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Repos\/CreateOrgRuleset\/Request\/ApplicationJson.php", - "hash": "8626ece4e51fec19715838c79bf928ff" + "hash": "3510ea1cccef695477bdc9eb4bb4f14b" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Repos\/UpdateOrgRuleset\/Request\/ApplicationJson.php", - "hash": "426bcb7c6d323af2b12b7b56566c185a" + "hash": "fc69f8a617e5785351ad8a694527d716" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Teams\/Create\/Request\/ApplicationJson.php", @@ -5648,11 +5648,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Repos\/CreateRepoRuleset\/Request\/ApplicationJson.php", - "hash": "a1ec19306a48bf833533db7e3f7c08ef" + "hash": "b5bc0de396046888507d2874875d48aa" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Repos\/UpdateRepoRuleset\/Request\/ApplicationJson.php", - "hash": "d1fe836ccfd8728b0ae121e2c1fe4672" + "hash": "8454bccfb8cbf8b0b0635a15d47d007a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/SecretScanning\/UpdateAlert\/Request\/ApplicationJson.php", @@ -5912,7 +5912,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php", - "hash": "28cced2b2066e975b813c4756d6d9e41" + "hash": "40681bd236d936e12c07611df739760a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Dependabot.php", @@ -5948,7 +5948,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "fa6719d3b16d3c7ed97317f8143119da" + "hash": "59890756247759e5bb8bf34f4d0283c2" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php", @@ -5980,7 +5980,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "f748bf54a9a5560bdd2ba3b02245aec7" + "hash": "e3d0fb7bf6fdae24d5c77c192f75dddc" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php", @@ -6000,7 +6000,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Git.php", - "hash": "9db43ca2c67d507d9387daeef46d9f63" + "hash": "ab7610a1347b5db28633e08794863ce3" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Pulls.php", @@ -6008,7 +6008,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecurityAdvisories.php", - "hash": "5e1ba8bf61a470f459224e9c395ff404" + "hash": "ff770b21094efb1ed605bd62cd6ee60e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Scim.php", @@ -12272,15 +12272,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetCreated.php", - "hash": "219329143972a3c87a60255a41d945b3" + "hash": "3745906c13bc1514ffb74aaec2053e14" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetDeleted.php", - "hash": "aaa4e002f4cc4b3de170195d11d479ac" + "hash": "646366987f657717e173115347d43f52" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited.php", - "hash": "0405743f8cf4238d1b47e9e37aea286d" + "hash": "73c76c53786fa9781ebcc4114db8685d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/SecurityAdvisories\/CreateRepositoryAdvisoryCveRequest\/Response\/ApplicationJson\/Accepted.php", @@ -12588,7 +12588,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/SecurityAdvisories\/ListGlobalAdvisories.php", - "hash": "b4ecaf6e56f01546fdcc9e86208d8f46" + "hash": "eb267ad6b65efef73618f5fb5ac633ca" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/SecurityAdvisories\/ListGlobalAdvisoriesTest.php", @@ -26056,7 +26056,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecurityAdvisories.php", - "hash": "9021b0368d7f9851324124f60f7a51c2" + "hash": "66019849b8ed5a24b407af978556b19f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Apps.php", @@ -26204,7 +26204,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Orgs.php", - "hash": "b3e49a2bb6d97bdcf6329d78cc2b7093" + "hash": "60e93c0879fba08f09548e2e2d1f6998" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Migrations.php", @@ -26332,7 +26332,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Orgs.php", - "hash": "6b2999079830ce29faaf441a7e3f7cbc" + "hash": "287cac26e23abe87d9ad96011db66cb9" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Teams.php", @@ -26636,7 +26636,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php", - "hash": "bbe0fadcba0be54424b156c6ca7d9137" + "hash": "24fc7ea4b2af79201c6722ce34fc1db1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Three.php", @@ -26672,7 +26672,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Four.php", - "hash": "357c5435add746f49352db02940da5fe" + "hash": "e38ddd8d5049c75e864802385ba02672" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", @@ -26720,7 +26720,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Five.php", - "hash": "1bc2e14132b41f20c4010f0304dcaae3" + "hash": "2d60145a93ebc2c26221058fe1d9783c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php", @@ -29860,11 +29860,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "ede56375d2524f82332ff81ca57b5f09" + "hash": "1efd2d80d9ab1a1e59bc6d34c3cefe2e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "65642c5f7295b44753162468dff556ed" + "hash": "358ba35723469380db51b84dbc0b733c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -30468,15 +30468,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/CreateCustomOrganizationRole.php", - "hash": "73f2e6e9a964f55c17b6c752b83c9dbf" + "hash": "c86cb1584c290a74cce75543ae004878" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/CreateCustomOrganizationRole.php", - "hash": "9a8cf90e61a6ecaa4ea346d3e5cd1690" + "hash": "2cfa39bca4642bb8640e02730b65ee9a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/CreateCustomOrganizationRoleTest.php", - "hash": "d1d74cf5b0df9b31c8eac904559c8437" + "hash": "1d4b2c68472c23e258d87ab8d994304d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/RevokeAllOrgRolesTeam.php", @@ -30548,15 +30548,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/PatchCustomOrganizationRole.php", - "hash": "917bf4e51d265f9385784c29a22dbb15" + "hash": "af9bc702c158902def707e23bc3e6189" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/PatchCustomOrganizationRole.php", - "hash": "10520e43fcf524b4591ebee4c59b5d71" + "hash": "b40a64b699cd59be2558d344c0b55198" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/PatchCustomOrganizationRoleTest.php", - "hash": "48a47caad0e72021f2debce6045e030f" + "hash": "2c9eda967c75144e95503b00454ad78e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Orgs\/ListOrgRoleTeams.php", @@ -30618,14 +30618,6 @@ "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Orgs\/ListOrgRoles\/Response\/ApplicationJson\/Ok.php", "hash": "c3865f4e055f36b97c4f633d1ebfd2bd" }, - { - "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Orgs\/CreateCustomOrganizationRole\/Request\/ApplicationJson.php", - "hash": "5969d9eafe873b8699072f6a21c83705" - }, - { - "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Orgs\/PatchCustomOrganizationRole\/Request\/ApplicationJson.php", - "hash": "3f07381cced831a911ea73a75c1a2e48" - }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/OrganizationFineGrainedPermissions.php", "hash": "ee72decb1a5bd3d913b8e00c9df1c2fa" @@ -32805,6 +32797,14 @@ { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/SubIssues.php", "hash": "e133405715af7c12ffef981d5433ac3f" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/OrganizationCustomOrganizationRoleCreateSchema.php", + "hash": "2f8c7770e7246f112366081c75fb13eb" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/OrganizationCustomOrganizationRoleUpdateSchema.php", + "hash": "4d2b4d4e56d64809b5416786296e8c0f" } ] }, diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php index 107f48cca29..6c909779efb 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/CreateCustomOrganizationRole.php @@ -33,7 +33,7 @@ public function __construct(private readonly SchemaValidator $requestSchemaValid public function createRequest(array $data): RequestInterface { - $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Orgs\CreateCustomOrganizationRole\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\OrganizationCustomOrganizationRoleCreateSchema::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)); } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php index 234cfaefe83..3c7c533efe9 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Orgs/PatchCustomOrganizationRole.php @@ -36,7 +36,7 @@ public function __construct(private readonly SchemaValidator $requestSchemaValid public function createRequest(array $data): RequestInterface { - $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\Orgs\PatchCustomOrganizationRole\Request\ApplicationJson::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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)); } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php index e34ef4c88a8..d367eebf991 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/CreateCustomOrganizationRole.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $org, array $params): OrganizationRole { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\CreateCustomOrganizationRole($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/PatchCustomOrganizationRole.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/PatchCustomOrganizationRole.php index d9ea294c127..bb27696364c 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/PatchCustomOrganizationRole.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Orgs/PatchCustomOrganizationRole.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $org, int $roleId, array $params): OrganizationRole { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Orgs\PatchCustomOrganizationRole($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org, $roleId); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php index be0e3458d52..0ef2e404a17 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/SecurityAdvisories/ListGlobalAdvisories.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $ghsaId, string $cveId, string $ecosystem, string $severity, $cwes, bool $isWithdrawn, $affects, string $published, string $updated, string $modified, string $epssPercentage, string $epssPercentile, string $before, string $after, string $type = 'reviewed', string $direction = 'desc', int $perPage = 30, string $sort = 'published'): iterable { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\SecurityAdvisories\ListGlobalAdvisories($this->responseSchemaValidator, $this->hydrator, $ghsaId, $cveId, $ecosystem, $severity, $cwes, $isWithdrawn, $affects, $published, $updated, $modified, $epssPercentage, $epssPercentile, $before, $after, $type, $direction, $perPage, $sort); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecurityAdvisories.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecurityAdvisories.php index 9b1c53dcbc1..597b0b81165 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecurityAdvisories.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/SecurityAdvisories.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable */ + /** @return Observable */ public function listGlobalAdvisories(array $params): iterable { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Two.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Two.php index 42211c3e9a7..44d3a1dc810 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Two.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Two.php @@ -22,7 +22,7 @@ public function __construct(private Routers $routers) { } - /** @return iterable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|Integration|WithoutBody|Json|Feed|ApiOverview|ResponseInterface|RateLimitOverview|PrivateUser|PublicUser|string { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Five.php index 6139fbab3ee..2b3dccfd204 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Five.php @@ -24,7 +24,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable */ + /** @return |Schema\OrganizationRole|Observable */ public function call(string $call, array $params, array $pathChunks): GistComment|OrganizationCustomRepositoryRole|OrgHook|OrganizationRole|iterable|WithoutBody|TeamFull|ProjectCard|Import|TeamDiscussion|GroupMapping|OrgMembership { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Orgs.php index 065f344c7b3..342efb2c5fd 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Orgs.php @@ -125,7 +125,6 @@ public function updateWebhook(array $params): OrgHook return $operator->call($arguments['org'], $arguments['hook_id'], $params); } - /** @return */ public function patchCustomOrganizationRole(array $params): OrganizationRole { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php index db222965ba3..2b25d661a6e 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Four.php @@ -30,6 +30,7 @@ public function __construct(private Routers $routers) { } + /** @return |Schema\OrganizationRole */ public function call(string $call, array $params, array $pathChunks): Integration|Authorization|GistComment|WithoutBody|BaseGist|OrganizationCustomRepositoryRole|OrgHook|OrganizationInvitation|Migration|OrganizationRole|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\UpdatePatAccesses\Response\ApplicationJson\Accepted\Application\Json|Project|FullRepository|RepositoryRuleset|TeamFull|ProjectColumn|TeamDiscussion { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Orgs.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Orgs.php index ef326f5449f..92515ea237b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Orgs.php @@ -84,7 +84,6 @@ public function createInvitation(array $params): OrganizationInvitation return $operator->call($arguments['org'], $params); } - /** @return */ public function createCustomOrganizationRole(array $params): OrganizationRole { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php index 599cedf240a..b8f141565d8 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Orgs.php @@ -355,7 +355,6 @@ public function listOrgRoles(string $org): \ApiClients\Client\GitHubEnterpriseCl return $this->operators->orgs👷ListOrgRoles()->call($org); } - /** @return */ public function createCustomOrganizationRole(string $org, array $params): OrganizationRole { return $this->operators->orgs👷CreateCustomOrganizationRole()->call($org, $params); @@ -409,7 +408,6 @@ public function deleteCustomOrganizationRole(string $org, int $roleId): WithoutB 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); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/SecurityAdvisories.php b/clients/GitHubEnterpriseCloud/src/Operation/SecurityAdvisories.php index b0345f59497..00a7e63417b 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/SecurityAdvisories.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/SecurityAdvisories.php @@ -17,7 +17,7 @@ public function __construct(private Internal\Operators $operators) { } - /** @return iterable */ + /** @return Observable */ public function listGlobalAdvisories(string $ghsaId, string $cveId, string $ecosystem, string $severity, mixed $cwes, bool $isWithdrawn, mixed $affects, string $published, string $updated, string $modified, string $epssPercentage, string $epssPercentile, string $before, string $after, string $type, string $direction, int $perPage, string $sort): iterable { return $this->operators->securityAdvisories👷ListGlobalAdvisories()->call($ghsaId, $cveId, $ecosystem, $severity, $cwes, $isWithdrawn, $affects, $published, $updated, $modified, $epssPercentage, $epssPercentile, $before, $after, $type, $direction, $perPage, $sort); diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index 3d770508e37..38b7f34ca67 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -48,7 +48,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /advisories') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'GET /advisories/{ghsa_id}') { @@ -1432,7 +1432,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /orgs/{org}/organization-roles') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\OrganizationRole'); } if ($call === 'DELETE /orgs/{org}/organization-roles/teams/{team_slug}') { @@ -1468,7 +1468,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'PATCH /orgs/{org}/organization-roles/{role_id}') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\OrganizationRole'); } if ($call === 'GET /orgs/{org}/organization-roles/{role_id}/teams') { diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Orgs/CreateCustomOrganizationRole/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/OrganizationCustomOrganizationRoleCreateSchema.php similarity index 64% rename from clients/GitHubEnterpriseCloud/src/Schema/Orgs/CreateCustomOrganizationRole/Request/ApplicationJson.php rename to clients/GitHubEnterpriseCloud/src/Schema/OrganizationCustomOrganizationRoleCreateSchema.php index 3ce6413c2f3..be40d2d1258 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Orgs/CreateCustomOrganizationRole/Request/ApplicationJson.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/OrganizationCustomOrganizationRoleCreateSchema.php @@ -2,9 +2,11 @@ declare(strict_types=1); -namespace ApiClients\Client\GitHubEnterpriseCloud\Schema\Orgs\CreateCustomOrganizationRole\Request; +namespace ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class ApplicationJson +use EventSauce\ObjectHydrator\MapFrom; + +final readonly class OrganizationCustomOrganizationRoleCreateSchema { public const SCHEMA_JSON = '{ "required": [ @@ -27,6 +29,17 @@ "type": "string" }, "description": "A list of additional permissions included in this role." + }, + "base_role": { + "enum": [ + "read", + "triage", + "write", + "maintain", + "admin" + ], + "type": "string", + "description": "The system role from which this role can inherit permissions." } } }'; @@ -38,15 +51,18 @@ "permissions": [ "generated", "generated" - ] + ], + "base_role": "read" }'; /** * name: The name of the custom role. * description: A short description about the intended usage of this role or what permissions it grants. * permissions: A list of additional permissions included in this role. + * baseRole: The system role from which this role can inherit permissions. */ - public function __construct(public string $name, public string|null $description, public array $permissions) + public function __construct(public string $name, public string|null $description, public array $permissions, #[MapFrom('base_role')] + public string|null $baseRole,) { } } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Orgs/PatchCustomOrganizationRole/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/OrganizationCustomOrganizationRoleUpdateSchema.php similarity index 54% rename from clients/GitHubEnterpriseCloud/src/Schema/Orgs/PatchCustomOrganizationRole/Request/ApplicationJson.php rename to clients/GitHubEnterpriseCloud/src/Schema/OrganizationCustomOrganizationRoleUpdateSchema.php index 70b2394c591..890d3777b73 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Orgs/PatchCustomOrganizationRole/Request/ApplicationJson.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/OrganizationCustomOrganizationRoleUpdateSchema.php @@ -2,9 +2,11 @@ declare(strict_types=1); -namespace ApiClients\Client\GitHubEnterpriseCloud\Schema\Orgs\PatchCustomOrganizationRole\Request; +namespace ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class ApplicationJson +use EventSauce\ObjectHydrator\MapFrom; + +final readonly class OrganizationCustomOrganizationRoleUpdateSchema { public const SCHEMA_JSON = '{ "type": "object", @@ -15,7 +17,7 @@ }, "description": { "type": "string", - "description": "A short description about the intended usage of this role or what permissions it grants." + "description": "A short description about the intended use of this role or the permissions it grants." }, "permissions": { "type": "array", @@ -23,6 +25,18 @@ "type": "string" }, "description": "A list of additional permissions included in this role." + }, + "base_role": { + "enum": [ + "none", + "read", + "triage", + "write", + "maintain", + "admin" + ], + "type": "string", + "description": "The system role from which this role can inherit permissions." } } }'; @@ -34,15 +48,18 @@ "permissions": [ "generated", "generated" - ] + ], + "base_role": "none" }'; /** * name: The name of the custom role. - * description: A short description about the intended usage of this role or what permissions it grants. + * description: A short description about the intended use of this role or the permissions it grants. * permissions: A list of additional permissions included in this role. + * baseRole: The system role from which this role can inherit permissions. */ - public function __construct(public string|null $name, public string|null $description, public array|null $permissions) + public function __construct(public string|null $name, public string|null $description, public array|null $permissions, #[MapFrom('base_role')] + public string|null $baseRole,) { } } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php index a04f378dd37..0944585ad6d 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php @@ -63,8 +63,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -1150,12 +1149,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php index e28295bc9e0..9e1c3e4ee52 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php @@ -62,8 +62,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -931,12 +930,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php index af552731f11..3c3d021ed68 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php @@ -58,8 +58,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -1145,12 +1144,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php b/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php index 3ed0d964d75..c8128a82f02 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php @@ -57,8 +57,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -926,12 +925,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php index 907e5bba41b..2bfb83be5d7 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRuleset.php @@ -81,8 +81,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -1248,12 +1247,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRulesetBypassActor.php b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRulesetBypassActor.php index b6052d4666c..a9d8b39a5ee 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRulesetBypassActor.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/RepositoryRulesetBypassActor.php @@ -29,8 +29,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -50,7 +49,7 @@ public const SCHEMA_DESCRIPTION = 'An actor that can bypass rules in a ruleset'; public const SCHEMA_EXAMPLE_DATA = '{ "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }'; diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php index 2616a972484..ebbe3cddd44 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetCreated.php @@ -1786,8 +1786,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -3426,12 +3425,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php index 08988ae297b..641751b0b24 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetDeleted.php @@ -1786,8 +1786,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -3426,12 +3425,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php index 7216eb95d0f..333b75747f4 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/WebhookRepositoryRulesetEdited.php @@ -1786,8 +1786,7 @@ "OrganizationAdmin", "RepositoryRole", "Team", - "DeployKey", - "EnterpriseTeam" + "DeployKey" ], "type": "string", "description": "The type of actor that can bypass a ruleset.\\n" @@ -6062,12 +6061,12 @@ "bypass_actors": [ { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" }, { "actor_id": 8, - "actor_type": "EnterpriseTeam", + "actor_type": "DeployKey", "bypass_mode": "always" } ], diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/CreateCustomOrganizationRoleTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/CreateCustomOrganizationRoleTest.php index 4fe56d78c49..b2500846940 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/CreateCustomOrganizationRoleTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/CreateCustomOrganizationRoleTest.php @@ -30,13 +30,13 @@ public function call_httpCode_201_requestContentType_application_json_responseCo $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -48,9 +48,9 @@ public function operations_httpCode_201_requestContentType_application_json_resp $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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)); + $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true)); } /** @test */ @@ -63,13 +63,13 @@ public function call_httpCode_422_requestContentType_application_json_responseCo $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -82,9 +82,9 @@ public function operations_httpCode_422_requestContentType_application_json_resp $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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)); + $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true)); } /** @test */ @@ -97,13 +97,13 @@ public function call_httpCode_404_requestContentType_application_json_responseCo $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -116,9 +116,9 @@ public function operations_httpCode_404_requestContentType_application_json_resp $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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)); + $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true)); } /** @test */ @@ -131,13 +131,13 @@ public function call_httpCode_409_requestContentType_application_json_responseCo $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -150,8 +150,8 @@ public function operations_httpCode_409_requestContentType_application_json_resp $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(); + $browser->request('POST', '/orgs/generated/organization-roles', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::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)); + $result = $client->operations()->orgs()->createCustomOrganizationRole('generated', json_decode(Schema\OrganizationCustomOrganizationRoleCreateSchema::SCHEMA_EXAMPLE_DATA, true)); } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php index 1ea54633a01..499f3072af0 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Orgs/PatchCustomOrganizationRoleTest.php @@ -30,14 +30,14 @@ public function call_httpCode_200_requestContentType_application_json_responseCo $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -49,9 +49,9 @@ public function operations_httpCode_200_requestContentType_application_json_resp $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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)); + $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true)); } /** @test */ @@ -64,14 +64,14 @@ public function call_httpCode_422_requestContentType_application_json_responseCo $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -84,9 +84,9 @@ public function operations_httpCode_422_requestContentType_application_json_resp $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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)); + $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true)); } /** @test */ @@ -99,14 +99,14 @@ public function call_httpCode_409_requestContentType_application_json_responseCo $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -119,9 +119,9 @@ public function operations_httpCode_409_requestContentType_application_json_resp $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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)); + $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true)); } /** @test */ @@ -134,14 +134,14 @@ public function call_httpCode_404_requestContentType_application_json_responseCo $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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))); + })(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true))); } /** @test */ @@ -154,8 +154,8 @@ public function operations_httpCode_404_requestContentType_application_json_resp $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(); + $browser->request('PATCH', '/orgs/generated/organization-roles/7', Argument::type('array'), json_encode(json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::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)); + $result = $client->operations()->orgs()->patchCustomOrganizationRole('generated', 7, json_decode(Schema\OrganizationCustomOrganizationRoleUpdateSchema::SCHEMA_EXAMPLE_DATA, true)); } } diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index a1d2f79e280..e8332a026db 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -18,7 +18,7 @@ function authHeader(): string } }, new Browser()); assertType('', $client->call('GET /')); -assertType('iterable', $client->call('GET /advisories')); +assertType('Observable', $client->call('GET /advisories')); assertType('', $client->call('GET /advisories/{ghsa_id}')); assertType('', $client->call('GET /app')); assertType('', $client->call('POST /app-manifests/{code}/conversions')); @@ -364,7 +364,7 @@ function authHeader(): string 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('Schema\\OrganizationRole', $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}')); @@ -373,7 +373,7 @@ function authHeader(): string 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('Schema\\OrganizationRole', $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')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index 9dab34d94ea..461769d2cf6 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -274,6 +274,8 @@ paths: enum: - updated - published + - epss_percentage + - epss_percentile default: published responses: '200': @@ -13919,7 +13921,18 @@ paths: 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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + Creates a custom organization role that can be assigned to users and teams, granting them specific + permissions over the organization and optionally across all repositories in the organization. For + more information on custom organization roles, see "[Managing people's access to your organization with roles](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + + To include repository permissions in an organization role, you must also include the `base_role` + field, which is one of `read`, `write`, `triage`, `maintain`, or `admin` (or `none` if no base role is set). This base role provides a set of + fine-grained permissions as well as implicit permissions - those that aren't exposed as fine-grained permissions + and can only be granted through the base role (like "reading a repo"). If you include repository permissions, those + permissions apply across all of the repositories in the organization. You do not have to include organization permissions + in order to add repository permissions. + + See "[List repository permissions](https://docs.github.com/enterprise-cloud@latest//rest/orgs/custom-roles#list-repository-fine-grained-permissions-for-an-organization)" for valid repository permissions. To use this endpoint, the authenticated user must be one of: @@ -13940,23 +13953,7 @@ paths: 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 + "$ref": "#/components/schemas/organization-custom-organization-role-create-schema" examples: default: value: @@ -14225,6 +14222,10 @@ paths: 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/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/about-custom-organization-roles)." + If the update would add repository permissions, the `base_role` must also be set to a value besides `none`, either + previously or as part of the update. + If the update sets the `base_role` field to `none`, you must also remove all of the repository + permissions as well, otherwise the update will fail. To use this endpoint, the authenticated user must be one of: @@ -14246,20 +14247,7 @@ paths: 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 + "$ref": "#/components/schemas/organization-custom-organization-role-update-schema" examples: default: value: @@ -80114,6 +80102,58 @@ components: - organization - created_at - updated_at + organization-custom-organization-role-create-schema: + type: object + properties: + name: + description: The name of the custom role. + type: string + description: + description: A short description about the intended usage of this role or + what permissions it grants. + type: string + permissions: + description: A list of additional permissions included in this role. + type: array + items: + type: string + base_role: + description: The system role from which this role can inherit permissions. + type: string + enum: + - read + - triage + - write + - maintain + - admin + required: + - name + - permissions + organization-custom-organization-role-update-schema: + type: object + properties: + name: + description: The name of the custom role. + type: string + description: + description: A short description about the intended use of this role or + the permissions it grants. + type: string + permissions: + description: A list of additional permissions included in this role. + type: array + items: + type: string + base_role: + description: The system role from which this role can inherit permissions. + type: string + enum: + - none + - read + - triage + - write + - maintain + - admin team-role-assignment: title: A Role Assignment for a Team description: The Relationship a Team has with a role. @@ -81367,7 +81407,6 @@ components: - RepositoryRole - Team - DeployKey - - EnterpriseTeam description: 'The type of actor that can bypass a ruleset. '