diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index e727ff35746..cc48e0da2cc 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "ee23af97204cde51d4c62161bf274df2", + "specHash": "a5a20c93e8ace47c79943304e911cf70", "generatedFiles": { "files": [ { @@ -5612,7 +5612,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "a8c5db6d9355b53d6d50f183f4b46d3c" + "hash": "e381fc2ab1bec61faae5d7c7ec67269c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -24968,7 +24968,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "ad415b3841dc9b800f1cc7a6c234741d" + "hash": "d99d9cc5cb5c29690e0b91c96416f739" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", @@ -27788,11 +27788,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "3337e3cb0fec269eaa0777dec7fb27fb" + "hash": "4550bdb89fce474ead600772552c8d66" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "03cab3a7415102e84c221abd10f4d4c2" + "hash": "d24d1361c76ad52b02ce010e49d18d83" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -29652,7 +29652,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeSecurity\/GetConfigurationsForOrg.php", - "hash": "c7b24a212c12432e9a4aeee0029906d8" + "hash": "b9029eb24ca041abb2dc0f82b4d77870" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeSecurity\/GetConfigurationsForOrgTest.php", @@ -29764,7 +29764,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CodeSecurityConfigurationRepositories.php", - "hash": "57e29c9da4fd2c0fcd7883610028402e" + "hash": "0e5a6895e8d6283c426d89c9c3fbde0d" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookBranchProtectionRuleEdited\/Changes\/LockAllowsForkSync.php", @@ -29812,7 +29812,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/CodeSecurity.php", - "hash": "5058da12ea42949d4f191bd9dd481708" + "hash": "1dc44fb96797b0a5a6285ed99a7607f0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Post\/CodeSecurity.php", @@ -29832,7 +29832,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/CodeSecurity.php", - "hash": "e24885ddb3664c0684e653da102206e0" + "hash": "89a797debae8bbbb18e991e556957a09" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/CodeSecurity\/Configurations.php", diff --git a/clients/GitHub/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php b/clients/GitHub/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php index 62d97b4e7c2..3630d0609e7 100644 --- a/clients/GitHub/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php +++ b/clients/GitHub/src/Internal/Operator/CodeSecurity/GetConfigurationsForOrg.php @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return iterable */ + /** @return Observable */ public function call(string $org, string $before, string $after, string $targetType = 'all', int $perPage = 30): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\CodeSecurity\GetConfigurationsForOrg($this->responseSchemaValidator, $this->hydrator, $org, $before, $after, $targetType, $perPage); diff --git a/clients/GitHub/src/Internal/Router/Get/CodeSecurity.php b/clients/GitHub/src/Internal/Router/Get/CodeSecurity.php index 2c836ed894b..de32945a026 100644 --- a/clients/GitHub/src/Internal/Router/Get/CodeSecurity.php +++ b/clients/GitHub/src/Internal/Router/Get/CodeSecurity.php @@ -21,7 +21,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return iterable */ + /** @return Observable */ public function getConfigurationsForOrg(array $params): iterable { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Five.php b/clients/GitHub/src/Internal/Router/Get/Five.php index 10d2a38964f..79c7c692dd1 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|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|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|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|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/Operation/CodeSecurity.php b/clients/GitHub/src/Operation/CodeSecurity.php index 6256eb54418..97c48a33108 100644 --- a/clients/GitHub/src/Operation/CodeSecurity.php +++ b/clients/GitHub/src/Operation/CodeSecurity.php @@ -17,7 +17,7 @@ public function __construct(private Internal\Operators $operators) { } - /** @return iterable */ + /** @return Observable */ public function getConfigurationsForOrg(string $org, string $before, string $after, string $targetType, int $perPage): iterable { return $this->operators->codeSecurity👷GetConfigurationsForOrg()->call($org, $before, $after, $targetType, $perPage); diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 9aaa6d719b3..3aee3a9827b 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -684,7 +684,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/code-security/configurations') { - return $this->typeResolver->resolve('iterable'); + return $this->typeResolver->resolve('Observable'); } if ($call === 'POST /orgs/{org}/code-security/configurations') { diff --git a/clients/GitHub/src/Schema/CodeSecurityConfigurationRepositories.php b/clients/GitHub/src/Schema/CodeSecurityConfigurationRepositories.php index 4accb5f3289..c6286198973 100644 --- a/clients/GitHub/src/Schema/CodeSecurityConfigurationRepositories.php +++ b/clients/GitHub/src/Schema/CodeSecurityConfigurationRepositories.php @@ -16,9 +16,11 @@ "attached", "attaching", "detached", + "removed", "enforced", "failed", - "updating" + "updating", + "removed_by_enterprise" ], "type": "string", "description": "The attachment status of the code security configuration on the repository." @@ -574,7 +576,7 @@ public const SCHEMA_TITLE = ''; public const SCHEMA_DESCRIPTION = 'Repositories associated with a code security configuration and attachment status'; public const SCHEMA_EXAMPLE_DATA = '{ - "status": "updating", + "status": "removed_by_enterprise", "repository": { "id": 1296269, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 12e6ce4fb0a..b764be58bda 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -177,7 +177,7 @@ function authHeader(): string assertType('', $client->call('DELETE /orgs/{org}/blocks/{username}')); assertType('Observable', $client->call('GET /orgs/{org}/code-scanning/alerts')); assertType('Observable', $client->call('LIST /orgs/{org}/code-scanning/alerts')); -assertType('iterable', $client->call('GET /orgs/{org}/code-security/configurations')); +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('', $client->call('DELETE /orgs/{org}/code-security/configurations/detach')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 45cdc6b2fc7..fd830970019 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -14734,7 +14734,7 @@ paths: summary: Enable or disable a security feature for an organization description: |- > [!WARNING] - > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). + > **Deprecation notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is deprecated. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/). Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." @@ -71139,9 +71139,11 @@ components: - attached - attaching - detached + - removed - enforced - failed - updating + - removed_by_enterprise repository: "$ref": "#/components/schemas/simple-repository" codespace-machine: