Skip to content

[GitHub] Update to 1.1.4-85662c80b53f38fb1fdf4e581c839168 from 1.1.4-808b83641f5a6cdecf73cd52f50366e7 #1574

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
166 changes: 83 additions & 83 deletions clients/GitHub/etc/openapi-client-generator.state

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -132,28 +132,28 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed

if ($signature === 'parameters|type' && $value['type'] === 'file_path_restriction') {
try {
return $hydrator->hydrateObject(Schema\RepositoryRuleset\Rules\Fifteen::class, $value);
return $hydrator->hydrateObject(Schema\RepositoryRuleFilePathRestriction::class, $value);
} catch (Throwable) {
}
}

if ($signature === 'parameters|type' && $value['type'] === 'max_file_path_length') {
try {
return $hydrator->hydrateObject(Schema\RepositoryRuleset\Rules\Sixteen::class, $value);
return $hydrator->hydrateObject(Schema\RepositoryRuleMaxFilePathLength::class, $value);
} catch (Throwable) {
}
}

if ($signature === 'parameters|type' && $value['type'] === 'file_extension_restriction') {
try {
return $hydrator->hydrateObject(Schema\RepositoryRuleset\Rules\Seventeen::class, $value);
return $hydrator->hydrateObject(Schema\RepositoryRuleFileExtensionRestriction::class, $value);
} catch (Throwable) {
}
}

if ($signature === 'parameters|type' && $value['type'] === 'max_file_size') {
try {
return $hydrator->hydrateObject(Schema\RepositoryRuleset\Rules\Eighteen::class, $value);
return $hydrator->hydrateObject(Schema\RepositoryRuleMaxFileSize::class, $value);
} catch (Throwable) {
}
}
Expand Down
48 changes: 42 additions & 6 deletions clients/GitHub/src/Internal/Operation/Repos/GetBranchRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function createRequest(): RequestInterface
return new Request('GET', str_replace(['{owner}', '{repo}', '{branch}', '{per_page}', '{page}'], [$this->owner, $this->repo, $this->branch, $this->perPage, $this->page], '/repos/{owner}/{repo}/rules/branches/{branch}' . '?per_page={per_page}&page={page}'));
}

/** @return Observable<Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning> */
/** @return Observable<Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleFilePathRestriction|Schema\RepositoryRuleMaxFilePathLength|Schema\RepositoryRuleFileExtensionRestriction|Schema\RepositoryRuleMaxFileSize|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning> */
public function createResponse(ResponseInterface $response): Observable
{
$code = $response->getStatusCode();
Expand All @@ -62,7 +62,7 @@ public function createResponse(ResponseInterface $response): Observable
* Response
**/
case 200:
return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning {
return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleFilePathRestriction|Schema\RepositoryRuleMaxFilePathLength|Schema\RepositoryRuleFileExtensionRestriction|Schema\RepositoryRuleMaxFileSize|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning {
$error = new RuntimeException();
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCreation::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
Expand Down Expand Up @@ -200,23 +200,59 @@ public function createResponse(ResponseInterface $response): Observable

items_application_json_two_hundred_aaaao:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleWorkflows::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleFilePathRestriction::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleWorkflows::class, $body);
return $this->hydrator->hydrateObject(Schema\RepositoryRuleFilePathRestriction::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaap;
}

items_application_json_two_hundred_aaaap:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCodeScanning::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleMaxFilePathLength::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleCodeScanning::class, $body);
return $this->hydrator->hydrateObject(Schema\RepositoryRuleMaxFilePathLength::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaaq;
}

items_application_json_two_hundred_aaaaq:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleFileExtensionRestriction::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleFileExtensionRestriction::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaar;
}

items_application_json_two_hundred_aaaar:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleMaxFileSize::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleMaxFileSize::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaas;
}

items_application_json_two_hundred_aaaas:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleWorkflows::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleWorkflows::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaat;
}

items_application_json_two_hundred_aaaat:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCodeScanning::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleCodeScanning::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaau;
}

items_application_json_two_hundred_aaaau:
throw $error;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function createRequest(): RequestInterface
return new Request('GET', str_replace(['{owner}', '{repo}', '{branch}', '{per_page}', '{page}'], [$this->owner, $this->repo, $this->branch, $this->perPage, $this->page], '/repos/{owner}/{repo}/rules/branches/{branch}' . '?per_page={per_page}&page={page}'));
}

/** @return Observable<Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning> */
/** @return Observable<Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleFilePathRestriction|Schema\RepositoryRuleMaxFilePathLength|Schema\RepositoryRuleFileExtensionRestriction|Schema\RepositoryRuleMaxFileSize|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning> */
public function createResponse(ResponseInterface $response): Observable
{
$code = $response->getStatusCode();
Expand All @@ -62,7 +62,7 @@ public function createResponse(ResponseInterface $response): Observable
* Response
**/
case 200:
return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning {
return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\RepositoryRuleCreation|Schema\RepositoryRuleUpdate|Schema\RepositoryRuleDeletion|Schema\RepositoryRuleRequiredLinearHistory|Schema\RepositoryRuleMergeQueue|Schema\RepositoryRuleRequiredDeployments|Schema\RepositoryRuleRequiredSignatures|Schema\RepositoryRulePullRequest|Schema\RepositoryRuleRequiredStatusChecks|Schema\RepositoryRuleNonFastForward|Schema\RepositoryRuleCommitMessagePattern|Schema\RepositoryRuleCommitAuthorEmailPattern|Schema\RepositoryRuleCommitterEmailPattern|Schema\RepositoryRuleBranchNamePattern|Schema\RepositoryRuleTagNamePattern|Schema\RepositoryRuleFilePathRestriction|Schema\RepositoryRuleMaxFilePathLength|Schema\RepositoryRuleFileExtensionRestriction|Schema\RepositoryRuleMaxFileSize|Schema\RepositoryRuleWorkflows|Schema\RepositoryRuleCodeScanning {
$error = new RuntimeException();
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCreation::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
Expand Down Expand Up @@ -200,23 +200,59 @@ public function createResponse(ResponseInterface $response): Observable

items_application_json_two_hundred_aaaao:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleWorkflows::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleFilePathRestriction::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleWorkflows::class, $body);
return $this->hydrator->hydrateObject(Schema\RepositoryRuleFilePathRestriction::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaap;
}

items_application_json_two_hundred_aaaap:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCodeScanning::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleMaxFilePathLength::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleCodeScanning::class, $body);
return $this->hydrator->hydrateObject(Schema\RepositoryRuleMaxFilePathLength::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaaq;
}

items_application_json_two_hundred_aaaaq:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleFileExtensionRestriction::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleFileExtensionRestriction::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaar;
}

items_application_json_two_hundred_aaaar:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleMaxFileSize::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleMaxFileSize::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaas;
}

items_application_json_two_hundred_aaaas:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleWorkflows::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleWorkflows::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaat;
}

items_application_json_two_hundred_aaaat:
try {
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCodeScanning::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));

return $this->hydrator->hydrateObject(Schema\RepositoryRuleCodeScanning::class, $body);
} catch (Throwable $error) {
goto items_application_json_two_hundred_aaaau;
}

items_application_json_two_hundred_aaaau:
throw $error;
});
}
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 iterable<int,Schema\Issue> */
/** @return Observable<Schema\Issue> */
public function call(string $org, string $labels, string $type, string $since, string $filter = 'assigned', string $state = 'open', string $sort = 'created', string $direction = 'desc', int $perPage = 30, int $page = 1): iterable
{
$operation = new \ApiClients\Client\GitHub\Internal\Operation\Issues\ListForOrg($this->responseSchemaValidator, $this->hydrator, $org, $labels, $type, $since, $filter, $state, $sort, $direction, $perPage, $page);
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 iterable<int,Schema\Issue> */
/** @return Observable<Schema\Issue> */
public function call(string $org, string $labels, string $type, string $since, string $filter = 'assigned', string $state = 'open', string $sort = 'created', string $direction = 'desc', int $perPage = 30, int $page = 1): iterable
{
$operation = new \ApiClients\Client\GitHub\Internal\Operation\Issues\ListForOrgListing($this->responseSchemaValidator, $this->hydrator, $org, $labels, $type, $since, $filter, $state, $sort, $direction, $perPage, $page);
Expand Down
Loading
Loading