Skip to content

Commit 5b43ed4

Browse files
authored
[GitHub] Update to 1.1.4-ac26bea3c7b43c61995d720fd1312db2 from 1.1.4-cdf06887872e14c33e252a1a6bb7b705
Detected Schema changes: ├─┬Paths │ ├─┬/repos/{owner}/{repo}/code-scanning/default-setup │ │ └─┬PATCH │ │ └─┬Responses │ │ └─┬403 │ │ └──[M] description (234537:20) │ └─┬/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies │ └─┬POST │ └─┬Requestbody │ └─┬application/json │ └─┬Schema │ └──[M] $ref (76868:14)❌ ├──ping └─┬Components ├──[-] schemas (76876:7)❌ └─┬copilot-organization-details └──[-] properties (67150:9)❌ Date: 09/28/23 | Commit: New: etc/specs/GitHub/previous.spec.yaml, Original: etc/specs/GitHub/current.spec.yaml Document Element | Total Changes | Breaking Changes paths | 2 | 1 components | 2 | 2 ❌ 3 Breaking changes out of 4 INFO: Modifications: 2 INFO: Removals: 2 INFO: Breaking Removals: 2 INFO: Breaking Modifications: 1 ERROR: breaking changes discovered
1 parent 9270952 commit 5b43ed4

File tree

14 files changed

+138
-38
lines changed

14 files changed

+138
-38
lines changed

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

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "cdf06887872e14c33e252a1a6bb7b705",
2+
"specHash": "ac26bea3c7b43c61995d720fd1312db2",
33
"generatedFiles": {
44
"files": [
55
{
@@ -5724,11 +5724,11 @@
57245724
},
57255725
{
57265726
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/ClientInterface.php",
5727-
"hash": "09d7102959a02234355f3a37b4e7da24"
5727+
"hash": "deb6df9745de99abb02ece3666765124"
57285728
},
57295729
{
57305730
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Client.php",
5731-
"hash": "519786bb2499e0fd1cb2b6bd5566704c"
5731+
"hash": "727ced4153177f7d2253e50504bb7b9b"
57325732
},
57335733
{
57345734
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/OperationsInterface.php",
@@ -5784,19 +5784,19 @@
57845784
},
57855785
{
57865786
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Orgs.php",
5787-
"hash": "83958c6c1c436bdf153cd8bdae2e843a"
5787+
"hash": "dfa7cd6180b0be5c0e76cef5f38ac666"
57885788
},
57895789
{
57905790
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Actions.php",
5791-
"hash": "56ce3ba7055d0d2927c95049f2480560"
5791+
"hash": "56e48d0312feaa0727880670a3771940"
57925792
},
57935793
{
57945794
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Oidc.php",
57955795
"hash": "21ef8fb95b99507b0be859bf4eee4c14"
57965796
},
57975797
{
57985798
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/CodeScanning.php",
5799-
"hash": "251dc21709d71c55674e5503b35eb1ef"
5799+
"hash": "c1ce482ef8c5d61be8045a6b0c7bd738"
58005800
},
58015801
{
58025802
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Codespaces.php",
@@ -5820,7 +5820,7 @@
58205820
},
58215821
{
58225822
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php",
5823-
"hash": "6ffd10a523e5354b810f7666dadbd6a8"
5823+
"hash": "5f7b337da116882133c6663c4de721df"
58245824
},
58255825
{
58265826
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php",
@@ -13520,7 +13520,7 @@
1352013520
},
1352113521
{
1352213522
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationDetails.php",
13523-
"hash": "905b45f0805df4b13768c43261f36770"
13523+
"hash": "971944c3f715a7f0cc62f8ee8dd71691"
1352413524
},
1352513525
{
1352613526
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Organization.php",
@@ -19772,11 +19772,11 @@
1977219772
},
1977319773
{
1977419774
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/CodeScanning\/UpdateDefaultSetup.php",
19775-
"hash": "395fa3b7f374cd0391010c09476a3d26"
19775+
"hash": "3604c2f8f8433596d675237b2e65f571"
1977619776
},
1977719777
{
1977819778
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/CodeScanning\/UpdateDefaultSetup.php",
19779-
"hash": "19d1658e1df87be7ac1e487e19b0e632"
19779+
"hash": "49062d0eeed7fa9c01bbdd84dca7163e"
1978019780
},
1978119781
{
1978219782
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/CodeScanning\/UpdateDefaultSetupTest.php",
@@ -20676,15 +20676,15 @@
2067620676
},
2067720677
{
2067820678
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/CreateDeploymentBranchPolicy.php",
20679-
"hash": "2a71f85431198398659261f7fc4cbae0"
20679+
"hash": "b4f586a86746ee84ca8219f63dd7873a"
2068020680
},
2068120681
{
2068220682
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/CreateDeploymentBranchPolicy.php",
2068320683
"hash": "a701bd5668ce1eb1478cb0a7aa5f23e5"
2068420684
},
2068520685
{
2068620686
"name": ".\/clients\/GitHub\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/CreateDeploymentBranchPolicyTest.php",
20687-
"hash": "45ac62ce91e0aa48a0674e0caf234e60"
20687+
"hash": "6110b8f7bb50389b50241c1046997315"
2068820688
},
2068920689
{
2069020690
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetDeploymentBranchPolicy.php",
@@ -26676,7 +26676,7 @@
2667626676
},
2667726677
{
2667826678
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/CodeScanning.php",
26679-
"hash": "0681867646815664b70c3aa068b2e386"
26679+
"hash": "85e9d69893f44d313ca1511a74ed2c9d"
2668026680
},
2668126681
{
2668226682
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Issues.php",
@@ -27020,7 +27020,7 @@
2702027020
},
2702127021
{
2702227022
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Six.php",
27023-
"hash": "8e3cafa763930d11395c2a83e10e40b7"
27023+
"hash": "a16146e43ebd2fbffa50463aab1e030f"
2702427024
},
2702527025
{
2702627026
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Router\/Patch\/Seven.php",
@@ -27480,7 +27480,7 @@
2748027480
},
2748127481
{
2748227482
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing.php",
27483-
"hash": "ffd979fc80cd4bc60aa454f14b758ad1"
27483+
"hash": "0038c6dc5f7bfd9500b08bc9a1d54592"
2748427484
},
2748527485
{
2748627486
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Copilot\/Billing\/Seats.php",
@@ -29405,6 +29405,10 @@
2940529405
{
2940629406
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Attribute\/CastUnionToType\/Schema\/CopilotSeatDetails\/Assignee.php",
2940729407
"hash": "df7d2cb225bdba45cacb0d5315739a18"
29408+
},
29409+
{
29410+
"name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicyNamePatternWithType.php",
29411+
"hash": "75ee48b1b7e1807e069f07092da95e2e"
2940829412
}
2940929413
]
2941029414
},

clients/GitHub/src/Client.php

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

clients/GitHub/src/ClientInterface.php

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

clients/GitHub/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⚡️GitHub⚡️Schema⚡️Copi
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⚡️GitHub⚡️Schema
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/GitHub/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/GitHub/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/GitHub/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\GitHub\Internal\Operator\CodeScanning;
66

77
use ApiClients\Client\GitHub\Internal;
8+
use ApiClients\Client\GitHub\Schema;
89
use ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse;
910
use ApiClients\Client\GitHub\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\GitHub\Internal\Operation\CodeScanning\UpdateDefaultSetup($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo);

clients/GitHub/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\GitHub\Internal\Router\Patch;
66

77
use ApiClients\Client\GitHub\Internal;
8+
use ApiClients\Client\GitHub\Schema;
89
use ApiClients\Client\GitHub\Schema\CodeScanningAlert;
910
use ApiClients\Client\GitHub\Schema\CodeScanningDefaultSetupUpdateResponse;
1011
use ApiClients\Client\GitHub\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/GitHub/src/Internal/Router/Patch/Six.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(private Routers $routers)
2929
{
3030
}
3131

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

clients/GitHub/src/Operation/CodeScanning.php

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

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

clients/GitHub/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\GitHub\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)