Skip to content

Commit 5f09d5e

Browse files
authored
Merge pull request #1574 from php-api-clients/GitHub/from-1.1.4-85662c80b53f38fb1fdf4e581c839168-from-1.1.4-85662c80b53f38fb1fdf4e581c839168
2 parents d7ac965 + 278fca8 commit 5f09d5e

File tree

60 files changed

+695
-267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+695
-267
lines changed

clients/GitHub/etc/openapi-client-generator.state

+83-83
Large diffs are not rendered by default.

clients/GitHub/src/Internal/Attribute/CastUnionToType/Schema/WebhookRepositoryRulesetEdited/Changes/Rules/Updated/Rule.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -132,28 +132,28 @@ public function cast(mixed $value, ObjectMapper $hydrator): mixed
132132

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

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

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

154154
if ($signature === 'parameters|type' && $value['type'] === 'max_file_size') {
155155
try {
156-
return $hydrator->hydrateObject(Schema\RepositoryRuleset\Rules\Eighteen::class, $value);
156+
return $hydrator->hydrateObject(Schema\RepositoryRuleMaxFileSize::class, $value);
157157
} catch (Throwable) {
158158
}
159159
}

clients/GitHub/src/Internal/Operation/Repos/GetBranchRules.php

+42-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function createRequest(): RequestInterface
4949
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}'));
5050
}
5151

52-
/** @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> */
52+
/** @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> */
5353
public function createResponse(ResponseInterface $response): Observable
5454
{
5555
$code = $response->getStatusCode();
@@ -62,7 +62,7 @@ public function createResponse(ResponseInterface $response): Observable
6262
* Response
6363
**/
6464
case 200:
65-
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 {
65+
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 {
6666
$error = new RuntimeException();
6767
try {
6868
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCreation::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
@@ -200,23 +200,59 @@ public function createResponse(ResponseInterface $response): Observable
200200

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

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

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

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

219219
items_application_json_two_hundred_aaaaq:
220+
try {
221+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleFileExtensionRestriction::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
222+
223+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleFileExtensionRestriction::class, $body);
224+
} catch (Throwable $error) {
225+
goto items_application_json_two_hundred_aaaar;
226+
}
227+
228+
items_application_json_two_hundred_aaaar:
229+
try {
230+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleMaxFileSize::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
231+
232+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleMaxFileSize::class, $body);
233+
} catch (Throwable $error) {
234+
goto items_application_json_two_hundred_aaaas;
235+
}
236+
237+
items_application_json_two_hundred_aaaas:
238+
try {
239+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleWorkflows::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
240+
241+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleWorkflows::class, $body);
242+
} catch (Throwable $error) {
243+
goto items_application_json_two_hundred_aaaat;
244+
}
245+
246+
items_application_json_two_hundred_aaaat:
247+
try {
248+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCodeScanning::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
249+
250+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleCodeScanning::class, $body);
251+
} catch (Throwable $error) {
252+
goto items_application_json_two_hundred_aaaau;
253+
}
254+
255+
items_application_json_two_hundred_aaaau:
220256
throw $error;
221257
});
222258
}

clients/GitHub/src/Internal/Operation/Repos/GetBranchRulesListing.php

+42-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function createRequest(): RequestInterface
4949
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}'));
5050
}
5151

52-
/** @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> */
52+
/** @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> */
5353
public function createResponse(ResponseInterface $response): Observable
5454
{
5555
$code = $response->getStatusCode();
@@ -62,7 +62,7 @@ public function createResponse(ResponseInterface $response): Observable
6262
* Response
6363
**/
6464
case 200:
65-
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 {
65+
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 {
6666
$error = new RuntimeException();
6767
try {
6868
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCreation::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
@@ -200,23 +200,59 @@ public function createResponse(ResponseInterface $response): Observable
200200

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

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

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

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

219219
items_application_json_two_hundred_aaaaq:
220+
try {
221+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleFileExtensionRestriction::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
222+
223+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleFileExtensionRestriction::class, $body);
224+
} catch (Throwable $error) {
225+
goto items_application_json_two_hundred_aaaar;
226+
}
227+
228+
items_application_json_two_hundred_aaaar:
229+
try {
230+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleMaxFileSize::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
231+
232+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleMaxFileSize::class, $body);
233+
} catch (Throwable $error) {
234+
goto items_application_json_two_hundred_aaaas;
235+
}
236+
237+
items_application_json_two_hundred_aaaas:
238+
try {
239+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleWorkflows::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
240+
241+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleWorkflows::class, $body);
242+
} catch (Throwable $error) {
243+
goto items_application_json_two_hundred_aaaat;
244+
}
245+
246+
items_application_json_two_hundred_aaaat:
247+
try {
248+
$this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\RepositoryRuleCodeScanning::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema'));
249+
250+
return $this->hydrator->hydrateObject(Schema\RepositoryRuleCodeScanning::class, $body);
251+
} catch (Throwable $error) {
252+
goto items_application_json_two_hundred_aaaau;
253+
}
254+
255+
items_application_json_two_hundred_aaaau:
220256
throw $error;
221257
});
222258
}

clients/GitHub/src/Internal/Operator/Issues/ListForOrg.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
2424
{
2525
}
2626

27-
/** @return iterable<int,Schema\Issue> */
27+
/** @return Observable<Schema\Issue> */
2828
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
2929
{
3030
$operation = new \ApiClients\Client\GitHub\Internal\Operation\Issues\ListForOrg($this->responseSchemaValidator, $this->hydrator, $org, $labels, $type, $since, $filter, $state, $sort, $direction, $perPage, $page);

clients/GitHub/src/Internal/Operator/Issues/ListForOrgListing.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
2424
{
2525
}
2626

27-
/** @return iterable<int,Schema\Issue> */
27+
/** @return Observable<Schema\Issue> */
2828
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
2929
{
3030
$operation = new \ApiClients\Client\GitHub\Internal\Operation\Issues\ListForOrgListing($this->responseSchemaValidator, $this->hydrator, $org, $labels, $type, $since, $filter, $state, $sort, $direction, $perPage, $page);

0 commit comments

Comments
 (0)