diff --git a/clients/GitHub/README.md b/clients/GitHub/README.md index 653561580d7..0d66222ac5d 100644 --- a/clients/GitHub/README.md +++ b/clients/GitHub/README.md @@ -24370,6 +24370,7 @@ Using the `call` method: $client->call('GET /search/issues', [ 'q' => 'generated', 'sort' => 'generated', + 'advanced_search' => 'generated', 'order' => 'generated', 'per_page' => 8, 'page' => 1, @@ -24380,6 +24381,7 @@ Operations method: ```php $client->operations()->search()->issuesAndPullRequests( q: 'generated', sort: 'generated', + advanced_search: 'generated', order: 'generated', per_page: 8, page: 1, diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index 5762e0ae98a..13f5b223f67 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "dbba2c62a8f04380c590a1aa0d1194e8", + "specHash": "a073e1a053477690d506f42cadb2ee51", "generatedFiles": { "files": [ { @@ -5512,7 +5512,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Meta.php", - "hash": "a8fadfb42bcf3fccda0029ce0998b2a3" + "hash": "9779fe2949bb9405bca9854edf4f271a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Apps.php", @@ -5560,7 +5560,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php", - "hash": "695e7f654b236bf55bd59f644bc85f92" + "hash": "9ff8ef5f3ac93cbfcd5941949b799b0f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php", @@ -5596,7 +5596,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "3fb22944280b64413803e036e9ad3dfe" + "hash": "ea690e98de5ba63a3bee3eec9caaceba" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -5620,7 +5620,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/DependencyGraph.php", - "hash": "8d5ee75ad1579f7a6399f58316194408" + "hash": "612e229e05512ef891ac681f6485361c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Git.php", @@ -5636,11 +5636,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Search.php", - "hash": "ce193ba85d9428d03c8e8bf1abc64370" + "hash": "0ac313bb9a9b8c63de4c07384be61560" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Users.php", - "hash": "6d754fc63bd5c19322e1424866bbc979" + "hash": "bd59faf2cdcd7a410b95fdd7afa58cce" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operations.php", @@ -11966,10 +11966,6 @@ "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet8CA88D83\/TietC1EE26A8\/TietDBE5B00E\/Tiet036221B4.php", "hash": "24bac67277dec31a06779052b7ad4e2b" }, - { - "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Meta\/GetZen\/Response\/ApplicationJson\/Ok.php", - "hash": "33dbe3112db7067cdbd2458bc6ab4658" - }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet81BFFF8F\/TietA44BD2D8\/TietB023CB5D\/TietC6A01FD3.php", "hash": "62c671d9770bf749015df8881d3df2ae" @@ -18356,11 +18352,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/DependencyGraph\/DiffRange.php", - "hash": "116456e8ee30ac3bd11fdc3b278103f8" + "hash": "9c84c35a2347dc64c1da46d2708e9aad" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/DependencyGraph\/DiffRange.php", - "hash": "9b7112069d64718668252811679c0989" + "hash": "a0cfc3522c0c7ca8f8f605cc272b759e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/DependencyGraph\/DiffRangeTest.php", @@ -21636,15 +21632,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Search\/IssuesAndPullRequests.php", - "hash": "2a02b8f9817e0165c0d72d87213d5b21" + "hash": "d3c90785807fc307e13e3ff0328254d8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Search\/IssuesAndPullRequests.php", - "hash": "1de1ca96a9dd5f68cba24b233620c9fd" + "hash": "8d8c6323f4f70063d918f6b54bcb5ac7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Search\/IssuesAndPullRequestsTest.php", - "hash": "9735e520b08cecb78b9de0250204cbaf" + "hash": "9bee95fbf3423db81898cbfc93b124cc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Search\/Labels.php", @@ -24192,11 +24188,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Meta\/GetZen.php", - "hash": "2a520e0702187499211e65b373b80647" + "hash": "53961aa99444148e636c24acb1fa38cc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Meta\/GetZen.php", - "hash": "6fd197b64372f1b58a5a4d45d5b2104f" + "hash": "af04fdf352b7a39345928b17ff062d1a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Meta\/GetZenTest.php", @@ -24304,7 +24300,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Meta.php", - "hash": "046309f575570b6279056bc5b08b68d8" + "hash": "93a7aad455601f0ca895437859d44aad" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/SecurityAdvisories.php", @@ -24340,7 +24336,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Orgs.php", - "hash": "6f0d89f4cd88ad21227236ff5964d06e" + "hash": "abb04bf1621cb43991f9573fc596839f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/RateLimit.php", @@ -24348,11 +24344,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php", - "hash": "c7992938e3f0e1003ecd051d4ff8df26" + "hash": "f3c057e95467f78b518e207d78fb7676" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php", - "hash": "8ebacf183493e00214f8ab9198f1e2bf" + "hash": "73bb3c82d5f0f1a9fae92b7134a1966f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Gitignore.php", @@ -24364,7 +24360,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Search.php", - "hash": "08604c1bd61ffd5ddd74e339d86c3d5b" + "hash": "26b5fb4bac208cd077d9389386b9426f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Teams.php", @@ -24420,7 +24416,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/DependencyGraph.php", - "hash": "f86f383f6a7241fd49483c83f6cf2c64" + "hash": "d2965532c55455ebd6793fe1bb999ddc" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Reactions.php", @@ -24828,11 +24824,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php", - "hash": "3eeaba9defd38317f28edc94eec69799" + "hash": "bb13b58b26a8cfc42d87084c46549183" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Three.php", - "hash": "1aec261782a0e1d7ce8e1e29f3ce6865" + "hash": "ffd42cd855658b552d8f4010a751c623" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php", @@ -24840,15 +24836,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "3dd3a71306c325dd0e6c0c1e12eac13d" + "hash": "f5ec8d2962554a8e1637fe776cd73689" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "0dedecb0bde849fc814accbaad7a04a1" + "hash": "1f657d72925483e30400b4d03125ecaa" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", - "hash": "d344dc282b0dbc9a24f0a51d85a03ba7" + "hash": "0f367f9aa206c1664be274e41030f4a0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php", @@ -27620,11 +27616,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "3cf3389635062d23bf72904e661b2699" + "hash": "fe8e1d2227a7764bdda061ccbe9c166e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "5ba771895fb7aadea8a950dd21e82651" + "hash": "9715a398f9dfff90f517d6f82f73324b" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -29632,7 +29628,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Orgs\/ListAttestations.php", - "hash": "2d766a715f628121c6ba70514b2ef30f" + "hash": "85c215763dfbed6b54f3ea2075e990f9" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Orgs\/ListAttestationsTest.php", @@ -29656,7 +29652,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/ListAttestations.php", - "hash": "8cc1aa693b8e8bce669b8609cf7030bc" + "hash": "7b606f10e5101a2056693dcba76cbc48" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/ListAttestationsTest.php", @@ -29668,7 +29664,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Users\/ListAttestations.php", - "hash": "066145832665cc62ea794ffb58f9ac4c" + "hash": "8772716765fcbd0a3855ad28e27392f7" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Users\/ListAttestationsTest.php", @@ -31925,6 +31921,10 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Users\/ListAttestations\/Response\/ApplicationJson\/Ok\/Application\/Json\/Attestations\/Bundle\/DsseEnvelope.php", "hash": "d26dbfbaa1f1ea1e1537684dd2f65460" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Operations\/Meta\/GetZen\/Response\/TextPlain\/Ok.php", + "hash": "7656684774f37ff42b47489d35ac9737" } ] }, diff --git a/clients/GitHub/src/Internal/Operation/DependencyGraph/DiffRange.php b/clients/GitHub/src/Internal/Operation/DependencyGraph/DiffRange.php index 3e0fc9954fc..ccf87d52432 100644 --- a/clients/GitHub/src/Internal/Operation/DependencyGraph/DiffRange.php +++ b/clients/GitHub/src/Internal/Operation/DependencyGraph/DiffRange.php @@ -82,7 +82,7 @@ public function createResponse(ResponseInterface $response): Observable throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); /** - * Response if GitHub Advanced Security is not enabled for this repository + * Response for a private repository when GitHub Advanced Security is not enabled, or if used against a fork **/ case 403: diff --git a/clients/GitHub/src/Internal/Operation/Meta/GetZen.php b/clients/GitHub/src/Internal/Operation/Meta/GetZen.php index 8d8c8f7e788..208b37580ed 100644 --- a/clients/GitHub/src/Internal/Operation/Meta/GetZen.php +++ b/clients/GitHub/src/Internal/Operation/Meta/GetZen.php @@ -12,7 +12,6 @@ use RuntimeException; use function explode; -use function json_decode; use function str_replace; final class GetZen @@ -34,8 +33,8 @@ public function createResponse(ResponseInterface $response): string $code = $response->getStatusCode(); [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); switch ($contentType) { - case 'application/json': - $body = json_decode($response->getBody()->getContents(), true); + case 'text/plain': + $body = $response->getBody()->getContents(); switch ($code) { case 200: return $body; diff --git a/clients/GitHub/src/Internal/Operation/Search/IssuesAndPullRequests.php b/clients/GitHub/src/Internal/Operation/Search/IssuesAndPullRequests.php index c6583ea862b..693f755803a 100644 --- a/clients/GitHub/src/Internal/Operation/Search/IssuesAndPullRequests.php +++ b/clients/GitHub/src/Internal/Operation/Search/IssuesAndPullRequests.php @@ -27,6 +27,9 @@ final class IssuesAndPullRequests private string $q; /**Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/search/search#ranking-search-results) **/ private string $sort; + /**Set to `true` to use advanced search. + Example: `http://api.github.com/search/issues?q={query}&advanced_search=true` **/ + private string $advancedSearch; /**Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. **/ private string $order; /**The number of results per page (max 100). 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)." **/ @@ -34,18 +37,19 @@ final class IssuesAndPullRequests /**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\Search\Issues $hydrator, string $q, string $sort, string $order = 'desc', int $perPage = 30, int $page = 1) + public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Search\Issues $hydrator, string $q, string $sort, string $advancedSearch, string $order = 'desc', int $perPage = 30, int $page = 1) { - $this->q = $q; - $this->sort = $sort; - $this->order = $order; - $this->perPage = $perPage; - $this->page = $page; + $this->q = $q; + $this->sort = $sort; + $this->advancedSearch = $advancedSearch; + $this->order = $order; + $this->perPage = $perPage; + $this->page = $page; } public function createRequest(): RequestInterface { - return new Request('GET', str_replace(['{q}', '{sort}', '{order}', '{per_page}', '{page}'], [$this->q, $this->sort, $this->order, $this->perPage, $this->page], '/search/issues' . '?q={q}&sort={sort}&order={order}&per_page={per_page}&page={page}')); + return new Request('GET', str_replace(['{q}', '{sort}', '{advanced_search}', '{order}', '{per_page}', '{page}'], [$this->q, $this->sort, $this->advancedSearch, $this->order, $this->perPage, $this->page], '/search/issues' . '?q={q}&sort={sort}&advanced_search={advanced_search}&order={order}&per_page={per_page}&page={page}')); } public function createResponse(ResponseInterface $response): Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|WithoutBody diff --git a/clients/GitHub/src/Internal/Operator/DependencyGraph/DiffRange.php b/clients/GitHub/src/Internal/Operator/DependencyGraph/DiffRange.php index 5725f9b5856..e596142350a 100644 --- a/clients/GitHub/src/Internal/Operator/DependencyGraph/DiffRange.php +++ b/clients/GitHub/src/Internal/Operator/DependencyGraph/DiffRange.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 $basehead, string $name): iterable { $operation = new \ApiClients\Client\GitHub\Internal\Operation\DependencyGraph\DiffRange($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $basehead, $name); diff --git a/clients/GitHub/src/Internal/Operator/Meta/GetZen.php b/clients/GitHub/src/Internal/Operator/Meta/GetZen.php index 5c02249ec34..a9b37b63b18 100644 --- a/clients/GitHub/src/Internal/Operator/Meta/GetZen.php +++ b/clients/GitHub/src/Internal/Operator/Meta/GetZen.php @@ -23,7 +23,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(): string { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Meta\GetZen($this->responseSchemaValidator, $this->hydrator); diff --git a/clients/GitHub/src/Internal/Operator/Orgs/ListAttestations.php b/clients/GitHub/src/Internal/Operator/Orgs/ListAttestations.php index 1ce28743cac..8d004ac0806 100644 --- a/clients/GitHub/src/Internal/Operator/Orgs/ListAttestations.php +++ b/clients/GitHub/src/Internal/Operator/Orgs/ListAttestations.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $before, string $after, string $org, string $subjectDigest, string $predicateType, int $perPage = 30): Ok { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Orgs\ListAttestations($this->responseSchemaValidator, $this->hydrator, $before, $after, $org, $subjectDigest, $predicateType, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/Repos/ListAttestations.php b/clients/GitHub/src/Internal/Operator/Repos/ListAttestations.php index 8fc2ab4d1ed..fcd418c3987 100644 --- a/clients/GitHub/src/Internal/Operator/Repos/ListAttestations.php +++ b/clients/GitHub/src/Internal/Operator/Repos/ListAttestations.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $owner, string $repo, string $before, string $after, string $subjectDigest, string $predicateType, int $perPage = 30): Json { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Repos\ListAttestations($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $before, $after, $subjectDigest, $predicateType, $perPage); diff --git a/clients/GitHub/src/Internal/Operator/Search/IssuesAndPullRequests.php b/clients/GitHub/src/Internal/Operator/Search/IssuesAndPullRequests.php index 90fd18cf8d4..6b1e346d96f 100644 --- a/clients/GitHub/src/Internal/Operator/Search/IssuesAndPullRequests.php +++ b/clients/GitHub/src/Internal/Operator/Search/IssuesAndPullRequests.php @@ -25,10 +25,9 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ - public function call(string $q, string $sort, string $order = 'desc', int $perPage = 30, int $page = 1): Ok|WithoutBody + public function call(string $q, string $sort, string $advancedSearch, string $order = 'desc', int $perPage = 30, int $page = 1): Ok|WithoutBody { - $operation = new \ApiClients\Client\GitHub\Internal\Operation\Search\IssuesAndPullRequests($this->responseSchemaValidator, $this->hydrator, $q, $sort, $order, $perPage, $page); + $operation = new \ApiClients\Client\GitHub\Internal\Operation\Search\IssuesAndPullRequests($this->responseSchemaValidator, $this->hydrator, $q, $sort, $advancedSearch, $order, $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): Ok|WithoutBody { return $operation->createResponse($response); diff --git a/clients/GitHub/src/Internal/Operator/Users/ListAttestations.php b/clients/GitHub/src/Internal/Operator/Users/ListAttestations.php index e294da1a7ae..ccc55052a95 100644 --- a/clients/GitHub/src/Internal/Operator/Users/ListAttestations.php +++ b/clients/GitHub/src/Internal/Operator/Users/ListAttestations.php @@ -26,6 +26,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $before, string $after, string $username, string $subjectDigest, string $predicateType, int $perPage = 30): Json|EmptyObject|WithoutBody { $operation = new \ApiClients\Client\GitHub\Internal\Operation\Users\ListAttestations($this->responseSchemaValidator, $this->hydrator, $before, $after, $username, $subjectDigest, $predicateType, $perPage); diff --git a/clients/GitHub/src/Internal/Router/Get/DependencyGraph.php b/clients/GitHub/src/Internal/Router/Get/DependencyGraph.php index a4d9e58753f..6f68f57d3ac 100644 --- a/clients/GitHub/src/Internal/Router/Get/DependencyGraph.php +++ b/clients/GitHub/src/Internal/Router/Get/DependencyGraph.php @@ -41,7 +41,7 @@ public function exportSbom(array $params): DependencyGraphSpdxSbom return $operator->call($arguments['owner'], $arguments['repo']); } - /** @return Observable */ + /** @return iterable */ public function diffRange(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 f03b94ba7e7..ce6e9d9bba2 100644 --- a/clients/GitHub/src/Internal/Router/Get/Five.php +++ b/clients/GitHub/src/Internal/Router/Get/Five.php @@ -52,7 +52,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|WithoutBody|Observable|Observable|Observable|Schema\BasicError|Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|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|Observable|Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Schema\EmptyObject|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody */ + /** @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|Observable */ public function call(string $call, array $params, array $pathChunks): HookDelivery|iterable|WithoutBody|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|Ok|ActionsOrganizationPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\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|\ApiClients\Client\GitHub\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|OrgPrivateRegistryConfiguration|RepositoryRuleset|\ApiClients\Client\GitHub\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|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\Application\Json|EmptyObject { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Meta.php b/clients/GitHub/src/Internal/Router/Get/Meta.php index be0f7259432..d7fc3ae8f49 100644 --- a/clients/GitHub/src/Internal/Router/Get/Meta.php +++ b/clients/GitHub/src/Internal/Router/Get/Meta.php @@ -61,7 +61,6 @@ public function getAllVersions(array $params): iterable return $operator->call(); } - /** @return */ public function getZen(array $params): string { $operator = new Internal\Operator\Meta\GetZen($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Zen()); diff --git a/clients/GitHub/src/Internal/Router/Get/Orgs.php b/clients/GitHub/src/Internal/Router/Get/Orgs.php index d8bf4b964a7..e5c9ff5ecb3 100644 --- a/clients/GitHub/src/Internal/Router/Get/Orgs.php +++ b/clients/GitHub/src/Internal/Router/Get/Orgs.php @@ -554,6 +554,7 @@ public function listForUser(array $params): iterable return $operator->call($arguments['username'], $arguments['per_page'], $arguments['page']); } + /** @return */ public function listAttestations(array $params): \ApiClients\Client\GitHub\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Repos.php b/clients/GitHub/src/Internal/Router/Get/Repos.php index 822e0b4813f..046c60709d1 100644 --- a/clients/GitHub/src/Internal/Router/Get/Repos.php +++ b/clients/GitHub/src/Internal/Router/Get/Repos.php @@ -1261,6 +1261,7 @@ public function getOrgRuleSuite(array $params): RuleSuite return $operator->call($arguments['org'], $arguments['rule_suite_id']); } + /** @return */ public function listAttestations(array $params): Json { $arguments = []; diff --git a/clients/GitHub/src/Internal/Router/Get/Search.php b/clients/GitHub/src/Internal/Router/Get/Search.php index a2ff4988d11..54a09266228 100644 --- a/clients/GitHub/src/Internal/Router/Get/Search.php +++ b/clients/GitHub/src/Internal/Router/Get/Search.php @@ -98,7 +98,6 @@ public function commits(array $params): \ApiClients\Client\GitHub\Schema\Operati return $operator->call($arguments['q'], $arguments['sort'], $arguments['order'], $arguments['per_page'], $arguments['page']); } - /** @return */ public function issuesAndPullRequests(array $params): \ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|WithoutBody { $arguments = []; @@ -114,6 +113,12 @@ public function issuesAndPullRequests(array $params): \ApiClients\Client\GitHub\ $arguments['sort'] = $params['sort']; unset($params['sort']); + if (array_key_exists('advanced_search', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: advanced_search'); + } + + $arguments['advanced_search'] = $params['advanced_search']; + unset($params['advanced_search']); if (array_key_exists('order', $params) === false) { throw new InvalidArgumentException('Missing mandatory field: order'); } @@ -134,7 +139,7 @@ public function issuesAndPullRequests(array $params): \ApiClients\Client\GitHub\ unset($params['page']); $operator = new Internal\Operator\Search\IssuesAndPullRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Search🌀Issues()); - return $operator->call($arguments['q'], $arguments['sort'], $arguments['order'], $arguments['per_page'], $arguments['page']); + return $operator->call($arguments['q'], $arguments['sort'], $arguments['advanced_search'], $arguments['order'], $arguments['per_page'], $arguments['page']); } /** @return */ diff --git a/clients/GitHub/src/Internal/Router/Get/Seven.php b/clients/GitHub/src/Internal/Router/Get/Seven.php index 9586971df58..e7d03607219 100644 --- a/clients/GitHub/src/Internal/Router/Get/Seven.php +++ b/clients/GitHub/src/Internal/Router/Get/Seven.php @@ -64,7 +64,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable||Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|iterable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\ConvertedNoteToIssueIssueEvent|Schema\TimelineCommentEvent|Schema\TimelineCrossReferencedEvent|Schema\TimelineCommittedEvent|Schema\TimelineReviewedEvent|Schema\TimelineLineCommentedEvent|Schema\TimelineCommitCommentedEvent|Schema\TimelineAssignedIssueEvent|Schema\TimelineUnassignedIssueEvent|Schema\StateChangeIssueEvent>|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|Ok|Json|OidcCustomSub|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListGithubHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoAccessToSelfHostedRunnerGroupInOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersInGroupForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListLabelsForSelfHostedRunnerForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedReposForOrgVariable\Response\ApplicationJson\Ok\Application\Json|WithoutBody|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListSelectedReposForOrgSecret\Response\ApplicationJson\Ok\Application\Json|HookDelivery|RulesetVersion|TeamDiscussion|TeamMembership|TeamProject|Artifact|ActionsCacheUsageByRepository|Job|ActionsWorkflowAccessToRepository|SelectedActions|ActionsGetDefaultWorkflowPermissions|Runner|WorkflowRun|ActionsPublicKey|ActionsSecret|ActionsVariable|Workflow|BranchProtection|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForSuite\Response\ApplicationJson\Ok|CodeScanningAlert|CodeScanningAnalysis|CodeScanningSarifsStatus|CodespacesPublicKey|RepoCodespacesSecret|RepositoryCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListForRef\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Checks\ListSuitesForRef\Response\ApplicationJson\Ok|CombinedCommitStatus|BasicError|DependabotAlert|DependabotPublicKey|DependabotSecret|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListDeploymentBranchPolicies\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetAllDeploymentProtectionRules\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListEnvironmentVariables\Response\ApplicationJson\Ok\Application\Json|Blob|GitCommit|GitRef|GitTag|GitTree|WebhookConfig|IssueComment|IssueEvent|PageBuild|PagesDeploymentStatus|PullRequestReviewComment|PullRequestReviewRequest|ReleaseAsset|Release|RuleSuite|SecretScanningAlert|TeamDiscussionComment|PackageVersion { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Six.php b/clients/GitHub/src/Internal/Router/Get/Six.php index d08455d0d03..336d0318838 100644 --- a/clients/GitHub/src/Internal/Router/Get/Six.php +++ b/clients/GitHub/src/Internal/Router/Get/Six.php @@ -82,7 +82,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return Observable||Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|CodeSecurityConfiguration|WithoutBody|BillingUsageReport|ActionsCacheUsageOrgEnterprise|Ok|ActionsHostedRunnerLimits|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersMachineSpecsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok|ActionsHostedRunner|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsOrg|Runner|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHub\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|Json|CopilotSeatDetails|Package|CustomProperty|RuleSuite|ActionsBillingUsage|PackagesBillingUsage|CombinedBillingUsage|NetworkConfiguration|NetworkSettings|ProjectCollaboratorPermission|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHub\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHub\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|TeamRepository|\ApiClients\Client\GitHub\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Three.php b/clients/GitHub/src/Internal/Router/Get/Three.php index 302a55dbe3d..979470321e9 100644 --- a/clients/GitHub/src/Internal/Router/Get/Three.php +++ b/clients/GitHub/src/Internal/Router/Get/Three.php @@ -30,7 +30,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|WithoutBody|Observable|Observable|Observable|Observable|Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Tools\OpenApiClient\Utils\Response\WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): GlobalAdvisory|iterable|WithoutBody|Integration|ClassroomAssignment|Classroom|CodeOfConduct|GistSimple|Ok|License|OrganizationFull|Project|\ApiClients\Client\GitHub\Schema\Operations\Search\Code\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Commits\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Labels\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Repos\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Topics\Response\ApplicationJson\Ok|\ApiClients\Client\GitHub\Schema\Operations\Search\Users\Response\ApplicationJson\Ok|TeamFull|Json|\ApiClients\Client\GitHub\Schema\Operations\Apps\ListInstallationsForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|InteractionLimitResponse|One|PrivateUser|PublicUser { if ($pathChunks[0] === '') { diff --git a/clients/GitHub/src/Internal/Router/Get/Two.php b/clients/GitHub/src/Internal/Router/Get/Two.php index e177dd7d04e..bd1dfb16713 100644 --- a/clients/GitHub/src/Internal/Router/Get/Two.php +++ b/clients/GitHub/src/Internal/Router/Get/Two.php @@ -22,7 +22,7 @@ public function __construct(private Routers $routers) { } - /** @return Observable||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|string */ 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/GitHub/src/Internal/Router/Get/Users.php b/clients/GitHub/src/Internal/Router/Get/Users.php index 2543fb5c819..ba7590e1dd4 100644 --- a/clients/GitHub/src/Internal/Router/Get/Users.php +++ b/clients/GitHub/src/Internal/Router/Get/Users.php @@ -540,6 +540,7 @@ public function listSshSigningKeysForUser(array $params): iterable return $operator->call($arguments['username'], $arguments['per_page'], $arguments['page']); } + /** @return */ public function listAttestations(array $params): Json|EmptyObject|WithoutBody { $arguments = []; diff --git a/clients/GitHub/src/Operation/DependencyGraph.php b/clients/GitHub/src/Operation/DependencyGraph.php index b1f3f9aa46d..e29ec336ffe 100644 --- a/clients/GitHub/src/Operation/DependencyGraph.php +++ b/clients/GitHub/src/Operation/DependencyGraph.php @@ -15,7 +15,7 @@ public function __construct(private Internal\Operators $operators) { } - /** @return Observable */ + /** @return iterable */ public function diffRange(string $owner, string $repo, string $basehead, string $name): iterable { return $this->operators->dependencyGraph👷DiffRange()->call($owner, $repo, $basehead, $name); diff --git a/clients/GitHub/src/Operation/Meta.php b/clients/GitHub/src/Operation/Meta.php index dd3d9ee0e43..c5c90215e85 100644 --- a/clients/GitHub/src/Operation/Meta.php +++ b/clients/GitHub/src/Operation/Meta.php @@ -40,7 +40,6 @@ public function getAllVersions(): iterable return $this->operators->meta👷GetAllVersions()->call(); } - /** @return */ public function getZen(): string { return $this->operators->meta👷GetZen()->call(); diff --git a/clients/GitHub/src/Operation/Orgs.php b/clients/GitHub/src/Operation/Orgs.php index ad737f9a09f..4adcad9de9b 100644 --- a/clients/GitHub/src/Operation/Orgs.php +++ b/clients/GitHub/src/Operation/Orgs.php @@ -49,6 +49,7 @@ public function update(string $org, array $params): OrganizationFull return $this->operators->orgs👷Update()->call($org, $params); } + /** @return */ public function listAttestations(string $before, string $after, string $org, string $subjectDigest, string $predicateType, int $perPage): Ok { return $this->operators->orgs👷ListAttestations()->call($before, $after, $org, $subjectDigest, $predicateType, $perPage); diff --git a/clients/GitHub/src/Operation/Repos.php b/clients/GitHub/src/Operation/Repos.php index 26690d25abb..fa9dfe15226 100644 --- a/clients/GitHub/src/Operation/Repos.php +++ b/clients/GitHub/src/Operation/Repos.php @@ -174,6 +174,7 @@ public function createAttestation(string $owner, string $repo, array $params): C return $this->operators->repos👷CreateAttestation()->call($owner, $repo, $params); } + /** @return */ public function listAttestations(string $owner, string $repo, string $before, string $after, string $subjectDigest, string $predicateType, int $perPage): Json { return $this->operators->repos👷ListAttestations()->call($owner, $repo, $before, $after, $subjectDigest, $predicateType, $perPage); diff --git a/clients/GitHub/src/Operation/Search.php b/clients/GitHub/src/Operation/Search.php index 9f898607e0d..fa81541e185 100644 --- a/clients/GitHub/src/Operation/Search.php +++ b/clients/GitHub/src/Operation/Search.php @@ -26,10 +26,9 @@ public function commits(string $q, string $sort, string $order, int $perPage, in return $this->operators->search👷Commits()->call($q, $sort, $order, $perPage, $page); } - /** @return */ - public function issuesAndPullRequests(string $q, string $sort, string $order, int $perPage, int $page): \ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|WithoutBody + public function issuesAndPullRequests(string $q, string $sort, string $advancedSearch, string $order, int $perPage, int $page): \ApiClients\Client\GitHub\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|WithoutBody { - return $this->operators->search👷IssuesAndPullRequests()->call($q, $sort, $order, $perPage, $page); + return $this->operators->search👷IssuesAndPullRequests()->call($q, $sort, $advancedSearch, $order, $perPage, $page); } /** @return */ diff --git a/clients/GitHub/src/Operation/Users.php b/clients/GitHub/src/Operation/Users.php index 7d58913053a..c08ba481c49 100644 --- a/clients/GitHub/src/Operation/Users.php +++ b/clients/GitHub/src/Operation/Users.php @@ -280,6 +280,7 @@ public function getByUsername(string $username): PrivateUser|PublicUser return $this->operators->users👷GetByUsername()->call($username); } + /** @return */ public function listAttestations(string $before, string $after, string $username, string $subjectDigest, string $predicateType, int $perPage): Json|EmptyObject|WithoutBody { return $this->operators->users👷ListAttestations()->call($before, $after, $username, $subjectDigest, $predicateType, $perPage); diff --git a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php index 3c0f345c27a..8e2506dc139 100644 --- a/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHub/src/PHPStan/ClientCallReturnTypes.php @@ -776,7 +776,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /orgs/{org}/attestations/{subject_digest}') { - return $this->typeResolver->resolve('Schema\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}/blocks') { @@ -2220,7 +2220,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/attestations/{subject_digest}') { - return $this->typeResolver->resolve('Schema\\Operations\\Repos\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /repos/{owner}/{repo}/autolinks') { @@ -2768,7 +2768,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}') { - return $this->typeResolver->resolve('Observable'); + return $this->typeResolver->resolve('iterable'); } if ($call === 'GET /repos/{owner}/{repo}/dependency-graph/sbom') { @@ -3972,7 +3972,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /search/issues') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\Search\\IssuesAndPullRequests\\Response\\ApplicationJson\\Ok|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); } if ($call === 'GET /search/labels') { @@ -4640,7 +4640,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /users/{username}/attestations/{subject_digest}') { - return $this->typeResolver->resolve('Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json|Schema\\EmptyObject|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /users/{username}/docker/conflicts') { @@ -4844,7 +4844,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /zen') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('string'); } return null; diff --git a/clients/GitHub/src/Schema/Operations/Meta/GetZen/Response/ApplicationJson/Ok.php b/clients/GitHub/src/Schema/Operations/Meta/GetZen/Response/TextPlain/Ok.php similarity index 90% rename from clients/GitHub/src/Schema/Operations/Meta/GetZen/Response/ApplicationJson/Ok.php rename to clients/GitHub/src/Schema/Operations/Meta/GetZen/Response/TextPlain/Ok.php index ae1e0f6548a..aa515b5fc8d 100644 --- a/clients/GitHub/src/Schema/Operations/Meta/GetZen/Response/ApplicationJson/Ok.php +++ b/clients/GitHub/src/Schema/Operations/Meta/GetZen/Response/TextPlain/Ok.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace ApiClients\Client\GitHub\Schema\Operations\Meta\GetZen\Response\ApplicationJson; +namespace ApiClients\Client\GitHub\Schema\Operations\Meta\GetZen\Response\TextPlain; use ApiClients\Client\GitHub\Schema; diff --git a/clients/GitHub/tests/Internal/Operation/Search/IssuesAndPullRequestsTest.php b/clients/GitHub/tests/Internal/Operation/Search/IssuesAndPullRequestsTest.php index 2c8fe809bf6..4ab528697a4 100644 --- a/clients/GitHub/tests/Internal/Operation/Search/IssuesAndPullRequestsTest.php +++ b/clients/GitHub/tests/Internal/Operation/Search/IssuesAndPullRequestsTest.php @@ -30,14 +30,15 @@ public function call_httpCode_200_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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\Search\IssuesAndPullRequests::OPERATION_MATCH, (static function (array $data): array { - $data['q'] = 'generated'; - $data['sort'] = 'generated'; - $data['order'] = 'generated'; - $data['per_page'] = 8; - $data['page'] = 1; + $data['q'] = 'generated'; + $data['sort'] = 'generated'; + $data['advanced_search'] = 'generated'; + $data['order'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; return $data; })([])); @@ -52,9 +53,9 @@ public function operations_httpCode_200_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 'generated', 8, 1); } /** @test */ @@ -67,14 +68,15 @@ public function call_httpCode_503_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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\Search\IssuesAndPullRequests::OPERATION_MATCH, (static function (array $data): array { - $data['q'] = 'generated'; - $data['sort'] = 'generated'; - $data['order'] = 'generated'; - $data['per_page'] = 8; - $data['page'] = 1; + $data['q'] = 'generated'; + $data['sort'] = 'generated'; + $data['advanced_search'] = 'generated'; + $data['order'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; return $data; })([])); @@ -90,9 +92,9 @@ public function operations_httpCode_503_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 'generated', 8, 1); } /** @test */ @@ -105,14 +107,15 @@ public function call_httpCode_422_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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\Search\IssuesAndPullRequests::OPERATION_MATCH, (static function (array $data): array { - $data['q'] = 'generated'; - $data['sort'] = 'generated'; - $data['order'] = 'generated'; - $data['per_page'] = 8; - $data['page'] = 1; + $data['q'] = 'generated'; + $data['sort'] = 'generated'; + $data['advanced_search'] = 'generated'; + $data['order'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; return $data; })([])); @@ -128,9 +131,9 @@ public function operations_httpCode_422_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 'generated', 8, 1); } /** @test */ @@ -143,14 +146,15 @@ public function call_httpCode_403_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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\Search\IssuesAndPullRequests::OPERATION_MATCH, (static function (array $data): array { - $data['q'] = 'generated'; - $data['sort'] = 'generated'; - $data['order'] = 'generated'; - $data['per_page'] = 8; - $data['page'] = 1; + $data['q'] = 'generated'; + $data['sort'] = 'generated'; + $data['advanced_search'] = 'generated'; + $data['order'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; return $data; })([])); @@ -166,9 +170,9 @@ public function operations_httpCode_403_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', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 'generated', 8, 1); } /** @test */ @@ -180,14 +184,15 @@ public function call_httpCode_304_empty(): void $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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\Search\IssuesAndPullRequests::OPERATION_MATCH, (static function (array $data): array { - $data['q'] = 'generated'; - $data['sort'] = 'generated'; - $data['order'] = 'generated'; - $data['per_page'] = 8; - $data['page'] = 1; + $data['q'] = 'generated'; + $data['sort'] = 'generated'; + $data['advanced_search'] = 'generated'; + $data['order'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; return $data; })([])); @@ -202,9 +207,9 @@ public function operations_httpCode_304_empty(): void $browser = $this->prophesize(Browser::class); $browser->withBase(Argument::any())->willReturn($browser->reveal()); $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); - $browser->request('GET', '/search/issues?q=generated&sort=generated&order=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $browser->request('GET', '/search/issues?q=generated&sort=generated&advanced_search=generated&order=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()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 8, 1); + $result = $client->operations()->search()->issuesAndPullRequests('generated', 'generated', 'generated', 'generated', 8, 1); self::assertArrayHasKey('code', $result); self::assertSame(304, $result['code']); } diff --git a/clients/GitHub/tests/Types/ClientCallReturnTypes.php b/clients/GitHub/tests/Types/ClientCallReturnTypes.php index 85d1391402d..9ceec592c27 100644 --- a/clients/GitHub/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHub/tests/Types/ClientCallReturnTypes.php @@ -200,7 +200,7 @@ function authHeader(): string assertType('', $client->call('PUT /orgs/{org}/actions/variables/{name}/repositories')); assertType('', $client->call('PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}')); assertType('', $client->call('DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}')); -assertType('Schema\\Operations\\Orgs\\ListAttestations\\Response\\ApplicationJson\\Ok', $client->call('GET /orgs/{org}/attestations/{subject_digest}')); +assertType('', $client->call('GET /orgs/{org}/attestations/{subject_digest}')); assertType('Observable', $client->call('GET /orgs/{org}/blocks')); assertType('Observable', $client->call('LIST /orgs/{org}/blocks')); assertType('', $client->call('GET /orgs/{org}/blocks/{username}')); @@ -561,7 +561,7 @@ function authHeader(): string assertType('Observable', $client->call('LIST /repos/{owner}/{repo}/assignees')); assertType('', $client->call('GET /repos/{owner}/{repo}/assignees/{assignee}')); assertType('', $client->call('POST /repos/{owner}/{repo}/attestations')); -assertType('Schema\\Operations\\Repos\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json', $client->call('GET /repos/{owner}/{repo}/attestations/{subject_digest}')); +assertType('', $client->call('GET /repos/{owner}/{repo}/attestations/{subject_digest}')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/autolinks')); assertType('', $client->call('POST /repos/{owner}/{repo}/autolinks')); assertType('', $client->call('GET /repos/{owner}/{repo}/autolinks/{autolink_id}')); @@ -698,7 +698,7 @@ function authHeader(): string assertType('', $client->call('GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}')); assertType('', $client->call('PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}')); assertType('', $client->call('DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}')); -assertType('Observable', $client->call('GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}')); +assertType('iterable', $client->call('GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}')); assertType('', $client->call('GET /repos/{owner}/{repo}/dependency-graph/sbom')); assertType('', $client->call('POST /repos/{owner}/{repo}/dependency-graph/snapshots')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/deployments')); @@ -999,7 +999,7 @@ function authHeader(): string assertType('Observable|WithoutBody', $client->call('GET /repositories')); assertType('', $client->call('GET /search/code')); assertType('', $client->call('GET /search/commits')); -assertType('', $client->call('GET /search/issues')); +assertType('Schema\\Operations\\Search\\IssuesAndPullRequests\\Response\\ApplicationJson\\Ok|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /search/issues')); assertType('', $client->call('GET /search/labels')); assertType('', $client->call('GET /search/repositories')); assertType('', $client->call('GET /search/topics')); @@ -1166,7 +1166,7 @@ function authHeader(): string assertType('', $client->call('GET /user/{account_id}')); assertType('Observable|WithoutBody', $client->call('GET /users')); assertType('', $client->call('GET /users/{username}')); -assertType('Schema\\Operations\\Users\\ListAttestations\\Response\\ApplicationJson\\Ok\\Application\\Json|Schema\\EmptyObject|\\ApiClients\\Tools\\OpenApiClient\\Utils\\Response\\WithoutBody', $client->call('GET /users/{username}/attestations/{subject_digest}')); +assertType('', $client->call('GET /users/{username}/attestations/{subject_digest}')); assertType('Observable', $client->call('GET /users/{username}/docker/conflicts')); assertType('Observable', $client->call('GET /users/{username}/events')); assertType('Observable', $client->call('LIST /users/{username}/events')); @@ -1217,4 +1217,4 @@ function authHeader(): string assertType('Observable', $client->call('GET /users/{username}/subscriptions')); assertType('Observable', $client->call('LIST /users/{username}/subscriptions')); assertType('Observable', $client->call('GET /versions')); -assertType('', $client->call('GET /zen')); +assertType('string', $client->call('GET /zen')); diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 8e8260686f8..320ab173878 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -17363,10 +17363,9 @@ paths: get: summary: List team projects description: |- - Lists the organization projects for a team. - - > [!NOTE] - > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + > [!WARNING] + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/list-projects-in-org @@ -17398,14 +17397,16 @@ paths: enabledForGitHubApps: true category: teams subcategory: teams + deprecationDate: '2024-05-23' + removalDate: '2025-04-01' + deprecated: true "/orgs/{org}/teams/{team_slug}/projects/{project_id}": get: summary: Check team permissions for a project description: |- - Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. - - > [!NOTE] - > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + > [!WARNING] + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/check-permissions-for-project-in-org @@ -17433,13 +17434,15 @@ paths: enabledForGitHubApps: true category: teams subcategory: teams + deprecationDate: '2024-05-23' + removalDate: '2025-04-01' + deprecated: true put: summary: Add or update team project permissions description: |- - Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. - - > [!NOTE] - > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + > [!WARNING] + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/add-or-update-project-permissions-in-org @@ -17500,13 +17503,15 @@ paths: enabledForGitHubApps: true category: teams subcategory: teams + deprecationDate: '2024-05-23' + removalDate: '2025-04-01' + deprecated: true delete: summary: Remove a project from a team description: |- - Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. - - > [!NOTE] - > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + > [!WARNING] + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/remove-project-in-org @@ -17525,6 +17530,9 @@ paths: enabledForGitHubApps: true category: teams subcategory: teams + deprecationDate: '2024-05-23' + removalDate: '2025-04-01' + deprecated: true "/orgs/{org}/teams/{team_slug}/repos": get: summary: List team repositories @@ -43212,19 +43220,8 @@ paths: get: summary: Search issues and pull requests description: |- - Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api). - - When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted - search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata). - - For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. - - `q=windows+label:bug+language:python+state:open&sort=created&order=asc` - - This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. - - > [!NOTE] - > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + > [!WARNING] + > **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025. tags: - search operationId: search/issues-and-pull-requests @@ -43268,6 +43265,7 @@ paths: - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/issues-advanced-search" responses: '200': description: Response @@ -43304,6 +43302,9 @@ paths: enabledForGitHubApps: true category: search subcategory: search + deprecationDate: '2025-03-04' + removalDate: '2025-09-04' + deprecated: true "/search/labels": get: summary: Search labels @@ -44841,9 +44842,8 @@ paths: summary: List team projects (Legacy) description: |- > [!WARNING] - > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/teams/teams#list-team-projects) endpoint. - - Lists the organization projects for a team. + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/list-projects-legacy @@ -44874,8 +44874,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' + removalDate: '2025-04-01' + deprecationDate: '2024-05-23' category: teams subcategory: teams deprecated: true @@ -44884,9 +44884,8 @@ paths: summary: Check team permissions for a project (Legacy) description: |- > [!WARNING] - > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/teams/teams#check-team-permissions-for-a-project) endpoint. - - Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/check-permissions-for-project-legacy @@ -44911,8 +44910,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' + removalDate: '2025-04-01' + deprecationDate: '2024-05-23' category: teams subcategory: teams deprecated: true @@ -44920,9 +44919,8 @@ paths: summary: Add or update team project permissions (Legacy) description: |- > [!WARNING] - > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/teams/teams#add-or-update-team-project-permissions) endpoint. - - Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/add-or-update-project-permissions-legacy @@ -44982,8 +44980,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' + removalDate: '2025-04-01' + deprecationDate: '2024-05-23' category: teams subcategory: teams deprecated: true @@ -44991,9 +44989,8 @@ paths: summary: Remove a project from a team (Legacy) description: |- > [!WARNING] - > **Endpoint closing down notice:** This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/teams/teams#remove-a-project-from-a-team) endpoint. - - Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + > **Closing down notice:** Projects (classic) is being deprecated in favor of the new Projects experience. + > See the [changelog](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) for more information. tags: - teams operationId: teams/remove-project-legacy @@ -45013,8 +45010,8 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' + removalDate: '2025-04-01' + deprecationDate: '2024-05-23' category: teams subcategory: teams deprecated: true @@ -51141,7 +51138,7 @@ paths: '200': description: Response content: - application/json: + text/plain: schema: type: string examples: @@ -230962,6 +230959,15 @@ components: - desc - asc default: desc + issues-advanced-search: + name: advanced_search + description: |- + Set to `true` to use advanced search. + Example: `http://api.github.com/search/issues?q={query}&advanced_search=true` + in: query + required: false + schema: + type: string team-id: name: team_id description: The unique identifier of the team. @@ -231260,7 +231266,8 @@ components: schema: "$ref": "#/components/schemas/basic-error" dependency_review_forbidden: - description: Response if GitHub Advanced Security is not enabled for this repository + description: Response for a private repository when GitHub Advanced Security + is not enabled, or if used against a fork content: application/json: schema: