Skip to content

[GitHubEnterprise-3.13] Update to 1.1.4-65c7d90809c912f318fd98e5a759353c from 1.1.4-c3eeb28f55a8ddf476a0103d39889bfa #1538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clients/GitHubEnterprise-3.13/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23112,6 +23112,7 @@ Using the `call` method:
$client->call('GET /search/issues', [
'q' => 'generated',
'sort' => 'generated',
'advanced_search' => 'generated',
'order' => 'generated',
'per_page' => 8,
'page' => 1,
Expand All @@ -23122,6 +23123,7 @@ Operations method:
```php
$client->operations()->search()->issuesAndPullRequests( q: 'generated',
sort: 'generated',
advanced_search: 'generated',
order: 'generated',
per_page: 8,
page: 1,
Expand Down
46 changes: 23 additions & 23 deletions clients/GitHubEnterprise-3.13/etc/openapi-client-generator.state
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"specHash": "c3eeb28f55a8ddf476a0103d39889bfa",
"specHash": "65c7d90809c912f318fd98e5a759353c",
"generatedFiles": {
"files": [
{
Expand Down Expand Up @@ -7596,11 +7596,11 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operation\/DependencyGraph\/DiffRange.php",
"hash": "d50c1f44324af87bb22d31ace542bb70"
"hash": "347b0ead9e19a2f8957e4bfa079f4dfb"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operator\/DependencyGraph\/DiffRange.php",
"hash": "075b6038151ce73c38ee1b662312e485"
"hash": "9bf7067713932c3221d92f2191b26a14"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Internal\/Operation\/DependencyGraph\/DiffRangeTest.php",
Expand Down Expand Up @@ -10912,15 +10912,15 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operation\/Search\/IssuesAndPullRequests.php",
"hash": "8e4109819ce368907eff8eabd6341fe9"
"hash": "9b350aeb02ce7387ccde262fa14421ff"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operator\/Search\/IssuesAndPullRequests.php",
"hash": "5ff8601f42dfc6c2fcebe6ff0a8bdf32"
"hash": "7e529f8c1df4812ca8b2791054142b14"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Internal\/Operation\/Search\/IssuesAndPullRequestsTest.php",
"hash": "838dfcdbda0db4e8f1f8fdb2ea494207"
"hash": "921079bf356772290fa3078f78000ffd"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operation\/Search\/Labels.php",
Expand Down Expand Up @@ -13132,11 +13132,11 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operation\/Meta\/GetZen.php",
"hash": "c7b9967d12f2ffe88bfe55261441fc6b"
"hash": "42e66180c21ac50cdae566f6ea6ab794"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Operator\/Meta\/GetZen.php",
"hash": "d9d04364b4b5d6c1dd1936d1c8c4e727"
"hash": "6e8ac5284c1f5b9ab767845a753174bb"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Internal\/Operation\/Meta\/GetZenTest.php",
Expand Down Expand Up @@ -24302,10 +24302,6 @@
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/Operations\/Repos\/RemoveStatusCheckContexts\/Response\/ApplicationJson\/Ok.php",
"hash": "281c0d6c5c45750679ee8c124ce8f652"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/Operations\/Meta\/GetZen\/Response\/ApplicationJson\/Ok.php",
"hash": "aa13406f9a90361b6de5c0ac5080ae24"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/EnterpriseAdmin\/CreateGlobalWebhook\/Request\/ApplicationJson.php",
"hash": "8af47db0edd99481c699b7bb40d6e9c1"
Expand Down Expand Up @@ -26400,7 +26396,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Meta.php",
"hash": "4bfec77db1fdd948564bf8bbf8b4eb90"
"hash": "79885a9c2e3f9d127ab68bfef21f8105"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/EnterpriseAdmin.php",
Expand Down Expand Up @@ -26444,7 +26440,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Search.php",
"hash": "3b4d9cf7d3811a23ea5be7009c9efb8f"
"hash": "f68c75df4413a658e2644892d2437a91"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Teams.php",
Expand Down Expand Up @@ -26504,7 +26500,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/DependencyGraph.php",
"hash": "e7d96c4a23ed8784eb3e47de15dffff3"
"hash": "d8a9edd547aaed7e01f557f0e4d77687"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Pulls.php",
Expand Down Expand Up @@ -26928,7 +26924,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Three.php",
"hash": "1c3402598477978c2f259e7d66016c4b"
"hash": "dd3e03cc2bc5917a695d1bbf0dc65ec1"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php",
Expand All @@ -26940,15 +26936,15 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Two.php",
"hash": "d1905900da5b62fabb0b324a38bb7279"
"hash": "488418233581df4e8dc3dbce8f58b2db"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
"hash": "944582af066e6fc6c831c4e7b872a838"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php",
"hash": "7a1cd736b439ecd5b76ca92383196bd7"
"hash": "8db59ced98108bd223596f21e396627c"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Eight.php",
Expand Down Expand Up @@ -27148,11 +27144,11 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
"hash": "2fb5474325448bccbcb22bb7d1158ea1"
"hash": "5ffe1714380665bca421b5cbd1f206d4"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
"hash": "54beea339c8099994a522e19c9c55b8c"
"hash": "07b227f12fa2ae0cd157847ee21cd2a3"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",
Expand All @@ -27164,7 +27160,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/Meta.php",
"hash": "41cc72ff89d01e5b48be965d9a5b63fd"
"hash": "36de6758976b0a2ceb21d6074889a987"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
Expand Down Expand Up @@ -27280,7 +27276,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/DependencyGraph.php",
"hash": "a638452f9411a0fc738141835c32327d"
"hash": "1a842b54f0e563f4c8b82d145032d428"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/Git.php",
Expand All @@ -27292,7 +27288,7 @@
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/Search.php",
"hash": "f575d503a83922ab6cd69e189613b87d"
"hash": "b3d46ba9c8468fc11c3405b1cf6997d6"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/Users.php",
Expand Down Expand Up @@ -29965,6 +29961,10 @@
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/RepositoryRuleParamsReviewer.php",
"hash": "9fb5f3613d9deee11da6ff5294c91b66"
},
{
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/Operations\/Meta\/GetZen\/Response\/TextPlain\/Ok.php",
"hash": "d0ca0c14c2d902d47122181008e84185"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use RuntimeException;

use function explode;
use function json_decode;
use function str_replace;

final class GetZen
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,29 @@ 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/[email protected]/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/[email protected]/rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
private int $perPage;
/**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/[email protected]/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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
{
}

/** @return Observable<Schema\DependencyGraphDiff> */
/** @return iterable<int,Schema\DependencyGraphDiff> */
public function call(string $owner, string $repo, string $basehead, string $name): iterable
{
$operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\DependencyGraph\DiffRange($this->responseSchemaValidator, $this->hydrator, $owner, $repo, $basehead, $name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public function __construct(private Browser $browser, private AuthenticationInte
{
}

/** @return */
public function call(): string
{
$operation = new \ApiClients\Client\GitHubEnterprise\Internal\Operation\Meta\GetZen($this->responseSchemaValidator, $this->hydrator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\GitHubEnterprise\Internal\Operation\Search\IssuesAndPullRequests($this->responseSchemaValidator, $this->hydrator, $q, $sort, $order, $perPage, $page);
$operation = new \ApiClients\Client\GitHubEnterprise\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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function exportSbom(array $params): DependencyGraphSpdxSbom
return $operator->call($arguments['owner'], $arguments['repo']);
}

/** @return Observable<Schema\DependencyGraphDiff> */
/** @return iterable<int,Schema\DependencyGraphDiff> */
public function diffRange(array $params): iterable
{
$arguments = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public function getOctocat(array $params): ResponseInterface
return $operator->call($arguments['s']);
}

/** @return */
public function getZen(array $params): string
{
$operator = new Internal\Operator\Meta\GetZen($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Zen());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public function commits(array $params): \ApiClients\Client\GitHubEnterprise\Sche
return $operator->call($arguments['q'], $arguments['sort'], $arguments['order'], $arguments['per_page'], $arguments['page']);
}

/** @return */
public function issuesAndPullRequests(array $params): \ApiClients\Client\GitHubEnterprise\Schema\Operations\Search\IssuesAndPullRequests\Response\ApplicationJson\Ok|WithoutBody
{
$arguments = [];
Expand All @@ -114,6 +113,12 @@ public function issuesAndPullRequests(array $params): \ApiClients\Client\GitHubE

$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');
}
Expand All @@ -134,7 +139,7 @@ public function issuesAndPullRequests(array $params): \ApiClients\Client\GitHubE
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 */
Expand Down
Loading
Loading