Skip to content

Commit 3660f3f

Browse files
authored
Merge pull request #538 from php-api-clients/GitHubEnterprise-3.6/from-1.1.4-hash-12ea0f10e355760649fd4e1fab456ffa-from-1.1.4-hash-12ea0f10e355760649fd4e1fab456ffa
2 parents 174872e + 547bcbf commit 3660f3f

File tree

34 files changed

+192
-477
lines changed

34 files changed

+192
-477
lines changed

clients/GitHubEnterprise-3.6/etc/openapi-client-generator.state

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

clients/GitHubEnterprise-3.6/src/Client.php

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

clients/GitHubEnterprise-3.6/src/ClientInterface.php

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

clients/GitHubEnterprise-3.6/src/Hydrator/Operation/App/Installations/InstallationId.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
6464

6565
$value = $accountCaster1->cast($value, $this);
6666

67+
if ($value === null) {
68+
$missingFields[] = 'account';
69+
goto after_account;
70+
}
71+
6772
$properties['account'] = $value;
6873

6974
after_account:

clients/GitHubEnterprise-3.6/src/Hydrator/Operation/Orgs/Org/Installation.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
6363

6464
$value = $accountCaster1->cast($value, $this);
6565

66+
if ($value === null) {
67+
$missingFields[] = 'account';
68+
goto after_account;
69+
}
70+
6671
$properties['account'] = $value;
6772

6873
after_account:

clients/GitHubEnterprise-3.6/src/Hydrator/Operation/Repos/Owner/Repo/Deployments.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
121121

122122
$value = $payloadCaster1->cast($value, $this);
123123

124+
if ($value === null) {
125+
$missingFields[] = 'payload';
126+
goto after_payload;
127+
}
128+
124129
$properties['payload'] = $value;
125130

126131
after_payload:

clients/GitHubEnterprise-3.6/src/Hydrator/Operation/Repos/Owner/Repo/Deployments/DeploymentId.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
121121

122122
$value = $payloadCaster1->cast($value, $this);
123123

124+
if ($value === null) {
125+
$missingFields[] = 'payload';
126+
goto after_payload;
127+
}
128+
124129
$properties['payload'] = $value;
125130

126131
after_payload:

clients/GitHubEnterprise-3.6/src/Hydrator/Operation/Repos/Owner/Repo/Installation.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
6464

6565
$value = $accountCaster1->cast($value, $this);
6666

67+
if ($value === null) {
68+
$missingFields[] = 'account';
69+
goto after_account;
70+
}
71+
6772
$properties['account'] = $value;
6873

6974
after_account:

clients/GitHubEnterprise-3.6/src/Hydrator/Operation/Users/Username/Installation.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
6363

6464
$value = $accountCaster1->cast($value, $this);
6565

66+
if ($value === null) {
67+
$missingFields[] = 'account';
68+
goto after_account;
69+
}
70+
6671
$properties['account'] = $value;
6772

6873
after_account:

clients/GitHubEnterprise-3.6/src/Operation/Git/GetTree.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ final class GetTree
2828
private string $owner;
2929
/**The name of the repository without the `.git` extension. The name is not case sensitive. **/
3030
private string $repo;
31+
/**The SHA1 value or ref (branch or tag) name of the tree. **/
32+
private string $treeSha;
3133
/**Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. **/
3234
private string $recursive;
3335

34-
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Hydrator\Operation\Repos\Owner\Repo\Git\Trees\TreeSha $hydrator, string $owner, string $repo, private string $treeSha, string $recursive)
36+
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Hydrator\Operation\Repos\Owner\Repo\Git\Trees\TreeSha $hydrator, string $owner, string $repo, string $treeSha, string $recursive)
3537
{
3638
$this->owner = $owner;
3739
$this->repo = $repo;
40+
$this->treeSha = $treeSha;
3841
$this->recursive = $recursive;
3942
}
4043

clients/GitHubEnterprise-3.6/src/Operation/Meta/GetZen.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use RuntimeException;
1313

1414
use function explode;
15+
use function json_decode;
1516
use function str_replace;
1617

1718
final class GetZen
@@ -35,8 +36,8 @@ public function createResponse(ResponseInterface $response): string
3536
$code = $response->getStatusCode();
3637
[$contentType] = explode(';', $response->getHeaderLine('Content-Type'));
3738
switch ($contentType) {
38-
case 'text/plain':
39-
$body = $response->getBody()->getContents();
39+
case 'application/json':
40+
$body = json_decode($response->getBody()->getContents(), true);
4041
switch ($code) {
4142
case 200:
4243
return $body;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForCommitComment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ListForCommitComment
3030
private string $repo;
3131
/**The unique identifier of the comment. **/
3232
private int $commentId;
33-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. **/
33+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a commit comment. **/
3434
private string $content;
3535
/**The number of results per page (max 100). **/
3636
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForIssue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ListForIssue
3030
private string $repo;
3131
/**The number that identifies the issue. **/
3232
private int $issueNumber;
33-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. **/
33+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue. **/
3434
private string $content;
3535
/**The number of results per page (max 100). **/
3636
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForIssueComment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ListForIssueComment
3030
private string $repo;
3131
/**The unique identifier of the comment. **/
3232
private int $commentId;
33-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. **/
33+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to an issue comment. **/
3434
private string $content;
3535
/**The number of results per page (max 100). **/
3636
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForPullRequestReviewComment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ListForPullRequestReviewComment
3030
private string $repo;
3131
/**The unique identifier of the comment. **/
3232
private int $commentId;
33-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. **/
33+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment. **/
3434
private string $content;
3535
/**The number of results per page (max 100). **/
3636
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForRelease.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ListForRelease
3030
private string $repo;
3131
/**The unique identifier of the release. **/
3232
private int $releaseId;
33-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. **/
33+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a release. **/
3434
private string $content;
3535
/**The number of results per page (max 100). **/
3636
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForTeamDiscussionCommentInOrg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class ListForTeamDiscussionCommentInOrg
2424
private int $discussionNumber;
2525
/**The number that identifies the comment. **/
2626
private int $commentNumber;
27-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. **/
27+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. **/
2828
private string $content;
2929
/**The number of results per page (max 100). **/
3030
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForTeamDiscussionCommentLegacy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class ListForTeamDiscussionCommentLegacy
2222
private int $discussionNumber;
2323
/**The number that identifies the comment. **/
2424
private int $commentNumber;
25-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. **/
25+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion comment. **/
2626
private string $content;
2727
/**The number of results per page (max 100). **/
2828
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForTeamDiscussionInOrg.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class ListForTeamDiscussionInOrg
2222
private string $teamSlug;
2323
/**The number that identifies the discussion. **/
2424
private int $discussionNumber;
25-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. **/
25+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. **/
2626
private string $content;
2727
/**The number of results per page (max 100). **/
2828
private int $perPage;

clients/GitHubEnterprise-3.6/src/Operation/Reactions/ListForTeamDiscussionLegacy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class ListForTeamDiscussionLegacy
2020
private int $teamId;
2121
/**The number that identifies the discussion. **/
2222
private int $discussionNumber;
23-
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. **/
23+
/**Returns a single [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a team discussion. **/
2424
private string $content;
2525
/**The number of results per page (max 100). **/
2626
private int $perPage;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
declare(strict_types=1);
44

5-
namespace ApiClients\Client\GitHubEnterprise\Schema\AliasAbstract\Tiet5B8F6BEF\TietD995C71D\Tiet322B9248;
5+
namespace ApiClients\Client\GitHubEnterprise\Schema\AliasAbstract\TietC2732743\Tiet145AE088\TietC34EBC7B;
66

7-
abstract readonly class Tiet29116D3C
7+
abstract readonly class TietB90A120F
88
{
9-
public const SCHEMA_JSON = '{"required":["content"],"type":"object","properties":{"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string","description":"The [reaction type](https:\\/\\/docs.github.com\\/[email protected]\\/rest\\/reference\\/reactions#reaction-types) to add to the team discussion comment."}}}';
9+
public const SCHEMA_JSON = '{"required":["content"],"type":"object","properties":{"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string","description":"The [reaction type](https:\\/\\/docs.github.com\\/[email protected]\\/rest\\/reactions\\/reactions#about-reactions) to add to the team discussion comment."}}}';
1010
public const SCHEMA_TITLE = '';
1111
public const SCHEMA_DESCRIPTION = '';
1212
public const SCHEMA_EXAMPLE_DATA = '{"content":"+1"}';
1313

1414
/**
15-
* content: The [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types) to add to the team discussion comment.
15+
* content: The [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions) to add to the team discussion comment.
1616
*/
1717
public function __construct(public string $content)
1818
{
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
declare(strict_types=1);
44

5-
namespace ApiClients\Client\GitHubEnterprise\Schema\AliasAbstract\Tiet1259B144\TietEBF0EA47\TietC3C98AC8;
5+
namespace ApiClients\Client\GitHubEnterprise\Schema\AliasAbstract\TietF6C256D2\Tiet0CB5829C\Tiet585EDFBB;
66

7-
abstract readonly class Tiet08338FEE
7+
abstract readonly class Tiet5D2F67C6
88
{
9-
public const SCHEMA_JSON = '{"required":["content"],"type":"object","properties":{"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string","description":"The [reaction type](https:\\/\\/docs.github.com\\/[email protected]\\/rest\\/reference\\/reactions#reaction-types) to add to the team discussion."}}}';
9+
public const SCHEMA_JSON = '{"required":["content"],"type":"object","properties":{"content":{"enum":["+1","-1","laugh","confused","heart","hooray","rocket","eyes"],"type":"string","description":"The [reaction type](https:\\/\\/docs.github.com\\/[email protected]\\/rest\\/reactions\\/reactions#about-reactions) to add to the team discussion."}}}';
1010
public const SCHEMA_TITLE = '';
1111
public const SCHEMA_DESCRIPTION = '';
1212
public const SCHEMA_EXAMPLE_DATA = '{"content":"+1"}';
1313

1414
/**
15-
* content: The [reaction type](https://docs.github.com/[email protected]/rest/reference/reactions#reaction-types) to add to the team discussion.
15+
* content: The [reaction type](https://docs.github.com/[email protected]/rest/reactions/reactions#about-reactions) to add to the team discussion.
1616
*/
1717
public function __construct(public string $content)
1818
{

clients/GitHubEnterprise-3.6/src/Schema/Operations/Meta/GetZen/Response/TextPlain/Ok.php renamed to clients/GitHubEnterprise-3.6/src/Schema/Operations/Meta/GetZen/Response/ApplicationJson/Ok.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace ApiClients\Client\GitHubEnterprise\Schema\Operations\Meta\GetZen\Response\TextPlain;
5+
namespace ApiClients\Client\GitHubEnterprise\Schema\Operations\Meta\GetZen\Response\ApplicationJson;
66

77
use ApiClients\Client\GitHubEnterprise\Schema;
88

clients/GitHubEnterprise-3.6/src/Schema/Pulls/CreateReview/Request/ApplicationJson.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
final readonly class ApplicationJson
1010
{
11-
public const SCHEMA_JSON = '{"type":"object","properties":{"commit_id":{"type":"string","description":"The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value."},"body":{"type":"string","description":"**Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review."},"event":{"enum":["APPROVE","REQUEST_CHANGES","COMMENT"],"type":"string","description":"The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https:\\/\\/docs.github.com\\/[email protected]\\/rest\\/pulls#submit-a-review-for-a-pull-request) when you are ready."},"comments":{"type":"array","items":{"required":["path","body"],"type":"object","properties":{"path":{"type":"string","description":"The relative path to the file that necessitates a review comment."},"position":{"type":"integer","description":"The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below."},"body":{"type":"string","description":"Text of the review comment."},"line":{"type":"integer","examples":[28]},"side":{"type":"string","examples":["RIGHT"]},"start_line":{"type":"integer","examples":[26]},"start_side":{"type":"string","examples":["LEFT"]}}},"description":"Use the following table to specify the location, destination, and contents of the draft review comment."}}}';
11+
public const SCHEMA_JSON = '{"type":"object","properties":{"commit_id":{"type":"string","description":"The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value."},"body":{"type":"string","description":"**Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review."},"event":{"enum":["APPROVE","REQUEST_CHANGES","COMMENT"],"type":"string","description":"The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https:\\/\\/docs.github.com\\/[email protected]\\/rest\\/pulls\\/reviews#submit-a-review-for-a-pull-request) when you are ready."},"comments":{"type":"array","items":{"required":["path","body"],"type":"object","properties":{"path":{"type":"string","description":"The relative path to the file that necessitates a review comment."},"position":{"type":"integer","description":"The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below."},"body":{"type":"string","description":"Text of the review comment."},"line":{"type":"integer","examples":[28]},"side":{"type":"string","examples":["RIGHT"]},"start_line":{"type":"integer","examples":[26]},"start_side":{"type":"string","examples":["LEFT"]}}},"description":"Use the following table to specify the location, destination, and contents of the draft review comment."}}}';
1212
public const SCHEMA_TITLE = '';
1313
public const SCHEMA_DESCRIPTION = '';
1414
public const SCHEMA_EXAMPLE_DATA = '{"commit_id":"generated","body":"generated","event":"APPROVE","comments":[{"path":"generated","position":8,"body":"generated","line":28,"side":"RIGHT","start_line":26,"start_side":"LEFT"},{"path":"generated","position":8,"body":"generated","line":28,"side":"RIGHT","start_line":26,"start_side":"LEFT"}]}';
1515

1616
/**
1717
* commitId: The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value.
1818
* body: **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review.
19-
* event: The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/[email protected]/rest/pulls#submit-a-review-for-a-pull-request) when you are ready.
19+
* event: The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/[email protected]/rest/pulls/reviews#submit-a-review-for-a-pull-request) when you are ready.
2020
* comments: Use the following table to specify the location, destination, and contents of the draft review comment.
2121
*/
2222
public function __construct(#[MapFrom('commit_id')]

0 commit comments

Comments
 (0)