Skip to content

Commit e74274b

Browse files
authored
Merge pull request #759 from php-api-clients/GitHubEnterpriseCloud/from-1.1.4-10c30043555d174ea360e7142e9a5627-from-1.1.4-10c30043555d174ea360e7142e9a5627
2 parents cf66758 + bdd49d9 commit e74274b

File tree

18 files changed

+5151
-35
lines changed

18 files changed

+5151
-35
lines changed

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

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "64807339d76b70126531bad7791aa05d",
2+
"specHash": "10c30043555d174ea360e7142e9a5627",
33
"generatedFiles": {
44
"files": [
55
{
@@ -6076,11 +6076,11 @@
60766076
},
60776077
{
60786078
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/ClientInterface.php",
6079-
"hash": "36be722499a74ca9cd04df0fc9514e61"
6079+
"hash": "d2a7a749af8d372cf4ac38d1b6206b9d"
60806080
},
60816081
{
60826082
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Client.php",
6083-
"hash": "1b73563cfcd3f1c48d955e5e49a95577"
6083+
"hash": "e881c0b056b70bf720a22aa948a05af6"
60846084
},
60856085
{
60866086
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/OperationsInterface.php",
@@ -6116,7 +6116,7 @@
61166116
},
61176117
{
61186118
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/CodeScanning.php",
6119-
"hash": "305591156d5d3f3d88031dc87c7e9e99"
6119+
"hash": "d8fdea90d9da2fd5720703a1b7fbf489"
61206120
},
61216121
{
61226122
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/SecretScanning.php",
@@ -13996,7 +13996,7 @@
1399613996
},
1399713997
{
1399813998
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationDetails.php",
13999-
"hash": "06e51c6ddc99e79e88d1dfb516448661"
13999+
"hash": "19e3b8d111d00c96b9aa1953f1a00128"
1400014000
},
1400114001
{
1400214002
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Organization.php",
@@ -21272,11 +21272,11 @@
2127221272
},
2127321273
{
2127421274
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/UpdateDefaultSetup.php",
21275-
"hash": "65e7393d6357a719cf07ce366554ff4d"
21275+
"hash": "625deb85c2da450282f219e270f01baf"
2127621276
},
2127721277
{
2127821278
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/UpdateDefaultSetup.php",
21279-
"hash": "5709f8a2bcf41a43bab2bcee132bb5ab"
21279+
"hash": "68d923c79479963415461f9b8058db09"
2128021280
},
2128121281
{
2128221282
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/UpdateDefaultSetupTest.php",
@@ -22176,15 +22176,15 @@
2217622176
},
2217722177
{
2217822178
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/CreateDeploymentBranchPolicy.php",
22179-
"hash": "cc5b983b6210061b5c35aef09a3d8215"
22179+
"hash": "01339bef37c0ef1a1d9bdc6207b8c2ab"
2218022180
},
2218122181
{
2218222182
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/CreateDeploymentBranchPolicy.php",
2218322183
"hash": "e102647e3ca3e0a62db56beb34558347"
2218422184
},
2218522185
{
2218622186
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/CreateDeploymentBranchPolicyTest.php",
22187-
"hash": "bdd32a76aeb0489c2da66c1cf7ad0002"
22187+
"hash": "452353b4054f6f43b156b2c7249dea93"
2218822188
},
2218922189
{
2219022190
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetDeploymentBranchPolicy.php",
@@ -28336,7 +28336,7 @@
2833628336
},
2833728337
{
2833828338
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeScanning.php",
28339-
"hash": "e07eb18669609b03e28f515007352bf6"
28339+
"hash": "901e662d7aab17d5f10b0d540a3e77db"
2834028340
},
2834128341
{
2834228342
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Migrations.php",
@@ -28704,7 +28704,7 @@
2870428704
},
2870528705
{
2870628706
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php",
28707-
"hash": "cee2fd96e7a13b67c17845dbb7eb2fdb"
28707+
"hash": "a2133606285c3a6e5e986478c90b8f97"
2870828708
},
2870928709
{
2871028710
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Three.php",
@@ -29292,7 +29292,7 @@
2929229292
},
2929329293
{
2929429294
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing.php",
29295-
"hash": "3c95313ebb63cf8df524c5936aaf4b75"
29295+
"hash": "3f81d4f0f3097b7e281f2727c3441103"
2929629296
},
2929729297
{
2929829298
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing\/Seats.php",
@@ -31509,6 +31509,26 @@
3150931509
{
3151031510
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/Assignee.php",
3151131511
"hash": "23a28307668db2b48df10922e4d7d665"
31512+
},
31513+
{
31514+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicyNamePatternWithType.php",
31515+
"hash": "7f6e1dfbf34028264ba9f0cc753775e7"
31516+
},
31517+
{
31518+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookUserCreated.php",
31519+
"hash": "08a86587c6bfc9341a494b61f39c04c2"
31520+
},
31521+
{
31522+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookUserDeleted.php",
31523+
"hash": "9d48d77f3e387bb8a31fea8dc759bfbc"
31524+
},
31525+
{
31526+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookUserCreated\/User.php",
31527+
"hash": "3515106ed9f57a53619b2896e5e39ba8"
31528+
},
31529+
{
31530+
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/WebhookUserDeleted\/User.php",
31531+
"hash": "5bfeb22e76ad14e92ba63249ab068651"
3151231532
}
3151331533
]
3151431534
},

clients/GitHubEnterpriseCloud/src/Client.php

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

clients/GitHubEnterpriseCloud/src/ClientInterface.php

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

clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Copilot/Billing.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
8585

8686
after_publicCodeSuggestions:
8787

88+
$value = $payload['copilot_chat'] ?? null;
89+
90+
if ($value === null) {
91+
$properties['copilotChat'] = null;
92+
goto after_copilotChat;
93+
}
94+
95+
$properties['copilotChat'] = $value;
96+
97+
after_copilotChat:
98+
8899
$value = $payload['seat_management_setting'] ?? null;
89100

90101
if ($value === null) {
@@ -366,6 +377,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
366377
$publicCodeSuggestions = $object->publicCodeSuggestions;
367378
after_publicCodeSuggestions: $result['public_code_suggestions'] = $publicCodeSuggestions;
368379

380+
$copilotChat = $object->copilotChat;
381+
382+
if ($copilotChat === null) {
383+
goto after_copilotChat;
384+
}
385+
386+
after_copilotChat: $result['copilot_chat'] = $copilotChat;
387+
369388
$seatManagementSetting = $object->seatManagementSetting;
370389
after_seatManagementSetting: $result['seat_management_setting'] = $seatManagementSetting;
371390

clients/GitHubEnterpriseCloud/src/Internal/Operation/CodeScanning/UpdateDefaultSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function createResponse(ResponseInterface $response): Schema\EmptyObject|
6767

6868
return $this->hydrator->hydrateObject(Schema\CodeScanningDefaultSetupUpdateResponse::class, $body);
6969
/**
70-
* Response if GitHub Advanced Security is not enabled for this repository
70+
* Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository
7171
**/
7272

7373
case 403:

clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/CreateDeploymentBranchPolicy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(private readonly SchemaValidator $requestSchemaValid
4040

4141
public function createRequest(array $data): RequestInterface
4242
{
43-
$this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\DeploymentBranchPolicyNamePattern::SCHEMA_JSON, \cebe\openapi\spec\Schema::class));
43+
$this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\DeploymentBranchPolicyNamePatternWithType::SCHEMA_JSON, \cebe\openapi\spec\Schema::class));
4444

4545
return new Request(self::METHOD, str_replace(['{owner}', '{repo}', '{environment_name}'], [$this->owner, $this->repo, $this->environmentName], self::PATH), ['Content-Type' => 'application/json'], json_encode($data));
4646
}

clients/GitHubEnterpriseCloud/src/Internal/Operator/CodeScanning/UpdateDefaultSetup.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Operator\CodeScanning;
66

77
use ApiClients\Client\GitHubEnterpriseCloud\Internal;
8+
use ApiClients\Client\GitHubEnterpriseCloud\Schema;
89
use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse;
910
use ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject;
1011
use ApiClients\Contracts\HTTP\Headers\AuthenticationInterface;
@@ -25,7 +26,7 @@ public function __construct(private Browser $browser, private AuthenticationInte
2526
{
2627
}
2728

28-
/** @return */
29+
/** @return Schema\EmptyObject|Schema\CodeScanningDefaultSetupUpdateResponse */
2930
public function call(string $owner, string $repo, array $params): EmptyObject|CodeScanningDefaultSetupUpdateResponse|array
3031
{
3132
$operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\CodeScanning\UpdateDefaultSetup($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo);

clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/CodeScanning.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Router\Patch;
66

77
use ApiClients\Client\GitHubEnterpriseCloud\Internal;
8+
use ApiClients\Client\GitHubEnterpriseCloud\Schema;
89
use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningAlert;
910
use ApiClients\Client\GitHubEnterpriseCloud\Schema\CodeScanningDefaultSetupUpdateResponse;
1011
use ApiClients\Client\GitHubEnterpriseCloud\Schema\EmptyObject;
@@ -21,7 +22,7 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri
2122
{
2223
}
2324

24-
/** @return */
25+
/** @return Schema\EmptyObject|Schema\CodeScanningDefaultSetupUpdateResponse */
2526
public function updateDefaultSetup(array $params): EmptyObject|CodeScanningDefaultSetupUpdateResponse|array
2627
{
2728
$arguments = [];

clients/GitHubEnterpriseCloud/src/Internal/Router/Patch/Six.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(private Routers $routers)
3232
{
3333
}
3434

35-
/** @return |array{code:int} */
35+
/** @return |array{code:int}|Schema\EmptyObject|Schema\CodeScanningDefaultSetupUpdateResponse */
3636
public function call(string $call, array $params, array $pathChunks): RunnerGroupsEnterprise|RunnerGroupsOrg|WebhookConfig|ExternalGroup|CheckRun|CheckSuitePreference|EmptyObject|CodeScanningDefaultSetupUpdateResponse|CommitComment|Hook|Import|RepositoryInvitation|Issue|BasicError|Label|Milestone|PullRequest|Release|RepositoryAdvisory|array
3737
{
3838
if ($pathChunks[0] === '') {

clients/GitHubEnterpriseCloud/src/Operation/CodeScanning.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function getDefaultSetup(string $owner, string $repo): CodeScanningDefaul
124124
return $this->operators->codeScanning👷GetDefaultSetup()->call($owner, $repo);
125125
}
126126

127-
/** @return */
127+
/** @return Schema\EmptyObject|Schema\CodeScanningDefaultSetupUpdateResponse */
128128
public function updateDefaultSetup(string $owner, string $repo, array $params): EmptyObject|CodeScanningDefaultSetupUpdateResponse|array
129129
{
130130
return $this->operators->codeScanning👷UpdateDefaultSetup()->call($owner, $repo, $params);

clients/GitHubEnterpriseCloud/src/Schema/CopilotOrganizationDetails.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@
5959
"type": "string",
6060
"description": "The organization policy for allowing or disallowing Copilot to make suggestions that match public code."
6161
},
62+
"copilot_chat": {
63+
"enum": [
64+
"enabled",
65+
"disabled",
66+
"unconfigured"
67+
],
68+
"type": "string",
69+
"description": "The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor."
70+
},
6271
"seat_management_setting": {
6372
"enum": [
6473
"assign_all",
@@ -85,17 +94,20 @@
8594
"inactive_this_cycle": 19
8695
},
8796
"public_code_suggestions": "allow",
97+
"copilot_chat": "unconfigured",
8898
"seat_management_setting": "assign_all"
8999
}';
90100

91101
/**
92102
* seatBreakdown: The breakdown of Copilot for Business seats for the organization.
93103
* publicCodeSuggestions: The organization policy for allowing or disallowing Copilot to make suggestions that match public code.
104+
* copilotChat: The organization policy for allowing or disallowing organization members to use Copilot Chat within their editor.
94105
* seatManagementSetting: The mode of assigning new seats.
95106
*/
96107
public function __construct(#[MapFrom('seat_breakdown')]
97108
public Schema\CopilotSeatBreakdown $seatBreakdown, #[MapFrom('public_code_suggestions')]
98-
public string $publicCodeSuggestions, #[MapFrom('seat_management_setting')]
109+
public string $publicCodeSuggestions, #[MapFrom('copilot_chat')]
110+
public string|null $copilotChat, #[MapFrom('seat_management_setting')]
99111
public string $seatManagementSetting,)
100112
{
101113
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubEnterpriseCloud\Schema;
6+
7+
final readonly class DeploymentBranchPolicyNamePatternWithType
8+
{
9+
public const SCHEMA_JSON = '{
10+
"title": "Deployment branch policy name pattern",
11+
"required": [
12+
"name"
13+
],
14+
"type": "object",
15+
"properties": {
16+
"name": {
17+
"type": "string",
18+
"description": "The name pattern that branches must match in order to deploy to the environment.\\n\\nWildcard characters will not match `\\/`. For example, to match branches that begin with `release\\/` and contain an additional single slash, use `release\\/*\\/*`.\\nFor more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https:\\/\\/ruby-doc.org\\/core-2.5.1\\/File.html#method-c-fnmatch).",
19+
"examples": [
20+
"release\\/*"
21+
]
22+
}
23+
}
24+
}';
25+
public const SCHEMA_TITLE = 'Deployment branch policy name pattern';
26+
public const SCHEMA_DESCRIPTION = '';
27+
public const SCHEMA_EXAMPLE_DATA = '{
28+
"name": "release\\/*"
29+
}';
30+
31+
/**
32+
* name: The name pattern that branches must match in order to deploy to the environment.
33+
34+
Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*`.
35+
For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).
36+
*/
37+
public function __construct(public string $name)
38+
{
39+
}
40+
}

0 commit comments

Comments
 (0)