Skip to content

Commit f75c94e

Browse files
authored
[GitHubAE] Update to 1.1.4-a0193cc447e66879f2e294bf7f90f620 from 1.1.4-3f4c3c9fd63eb631505ac6fba7a948c3
Detected Schema changes: ├─┬Paths │ ├─┬/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies │ │ └─┬POST │ │ ├──[M] description (19212:20) │ │ ├─┬Responses │ │ │ └─┬200 │ │ │ └─┬application/json │ │ │ └──[-] examples (192360:7)❌ │ │ └─┬Requestbody │ │ └─┬application/json │ │ ├──[-] examples (19243:17)❌ │ │ └─┬example-single-branch │ │ └──[-] value (19240:19) │ └─┬/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id} │ ├─┬GET │ │ └──[M] description (19266:20) │ ├─┬PUT │ │ └──[M] description (19298:20) │ └─┬DELETE │ └──[M] description (19340:20) ├─┬check-run-requested-action │ └──POST └─┬Components ├──[-] examples (192360:7)❌ ├─┬deployment-branch-policy-name-pattern-with-type │ ├──[M] title (58802:14) │ ├──[-] properties (58830:9)❌ │ └─┬name │ └──[M] description (58806:24) └─┬deployment-branch-policy ├──[M] description (58783:20) ├──[-] properties (58809:9)❌ ├─┬id │ └──[M] description (58787:24) └─┬name └──[M] description (58796:24) Date: 10/10/23 | Commit: New: etc/specs/GitHubAE/previous.spec.yaml, Original: etc/specs/GitHubAE/current.spec.yaml Document Element | Total Changes | Breaking Changes paths | 7 | 2 components | 8 | 3 ❌ 5 Breaking changes out of 15 INFO: Modifications: 9 INFO: Removals: 6 INFO: Breaking Removals: 5 ERROR: breaking changes discovered
1 parent d2aadd0 commit f75c94e

File tree

6 files changed

+102
-25
lines changed

6 files changed

+102
-25
lines changed

etc/openapi-client-generator.state

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "3f4c3c9fd63eb631505ac6fba7a948c3",
2+
"specHash": "a0193cc447e66879f2e294bf7f90f620",
33
"generatedFiles": {
44
"files": [
55
{
@@ -848,7 +848,7 @@
848848
},
849849
{
850850
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicy.php",
851-
"hash": "99ed63138b4d0708fbda73a259889607"
851+
"hash": "e2c93b319583be6ed9b199c069e28e9f"
852852
},
853853
{
854854
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicyNamePattern.php",
@@ -4468,7 +4468,7 @@
44684468
},
44694469
{
44704470
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Schema\/Operations\/Repos\/ListDeploymentBranchPolicies\/Response\/ApplicationJson\/Ok.php",
4471-
"hash": "35dc6cc57ecf18257ef3b9cb90b9cb30"
4471+
"hash": "79f2f0aa80319b152f2dba47b7bf2cf0"
44724472
},
44734473
{
44744474
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Schema\/Repos\/CreateFork\/Request\/ApplicationJson.php",
@@ -22756,11 +22756,11 @@
2275622756
},
2275722757
{
2275822758
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Environments\/EnvironmentName\/DeploymentBranchPolicies.php",
22759-
"hash": "29ecc73b4529bc40b6cfa8e6858fbaa1"
22759+
"hash": "83df34dc4c595543848e399c75af1797"
2276022760
},
2276122761
{
2276222762
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Environments\/EnvironmentName\/DeploymentBranchPolicies\/BranchPolicyId.php",
22763-
"hash": "06a2179e23e00796718dc254c595295d"
22763+
"hash": "d24597f8812c926d0a6553a8339bb360"
2276422764
},
2276522765
{
2276622766
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Forks.php",
@@ -23404,7 +23404,7 @@
2340423404
},
2340523405
{
2340623406
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Schema\/DeploymentBranchPolicyNamePatternWithType.php",
23407-
"hash": "0b3d0945d7c97e2f516829d303f42e99"
23407+
"hash": "f77d04f1cd7fc9c197a13182f4d68ad5"
2340823408
},
2340923409
{
2341023410
"name": ".\/clients\/GitHubAE\/etc\/..\/\/src\/\/Schema\/PreventSelfReview.php",

src/Internal/Hydrator/Operation/Repos/Owner/Repo/Environments/EnvironmentName/DeploymentBranchPolicies.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️De
123123
$properties['name'] = $value;
124124

125125
after_name:
126+
127+
$value = $payload['type'] ?? null;
128+
129+
if ($value === null) {
130+
$properties['type'] = null;
131+
goto after_type;
132+
}
133+
134+
$properties['type'] = $value;
135+
136+
after_type:
126137
} catch (Throwable $exception) {
127138
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubAE\Schema\DeploymentBranchPolicy', $exception, stack: $this->hydrationStack);
128139
}
@@ -283,6 +294,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema
283294

284295
after_name: $result['name'] = $name;
285296

297+
$type = $object->type;
298+
299+
if ($type === null) {
300+
goto after_type;
301+
}
302+
303+
after_type: $result['type'] = $type;
304+
286305
return $result;
287306
}
288307

src/Internal/Hydrator/Operation/Repos/Owner/Repo/Environments/EnvironmentName/DeploymentBranchPolicies/BranchPolicyId.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubAE⚡️Schema⚡️De
8080
$properties['name'] = $value;
8181

8282
after_name:
83+
84+
$value = $payload['type'] ?? null;
85+
86+
if ($value === null) {
87+
$properties['type'] = null;
88+
goto after_type;
89+
}
90+
91+
$properties['type'] = $value;
92+
93+
after_type:
8394
} catch (Throwable $exception) {
8495
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubAE\Schema\DeploymentBranchPolicy', $exception, stack: $this->hydrationStack);
8596
}
@@ -218,6 +229,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubAE⚡️Schema
218229

219230
after_name: $result['name'] = $name;
220231

232+
$type = $object->type;
233+
234+
if ($type === null) {
235+
goto after_type;
236+
}
237+
238+
after_type: $result['type'] = $type;
239+
221240
return $result;
222241
}
223242

src/Schema/DeploymentBranchPolicy.php

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"properties": {
1515
"id": {
1616
"type": "integer",
17-
"description": "The unique identifier of the branch policy.",
17+
"description": "The unique identifier of the branch or tag policy.",
1818
"examples": [
1919
361471
2020
]
@@ -27,28 +27,41 @@
2727
},
2828
"name": {
2929
"type": "string",
30-
"description": "The name pattern that branches must match in order to deploy to the environment.",
30+
"description": "The name pattern that branches or tags must match in order to deploy to the environment.",
3131
"examples": [
3232
"release\\/*"
3333
]
34+
},
35+
"type": {
36+
"enum": [
37+
"branch",
38+
"tag"
39+
],
40+
"type": "string",
41+
"description": "Whether this rule targets a branch or tag.",
42+
"examples": [
43+
"branch"
44+
]
3445
}
3546
},
36-
"description": "Details of a deployment branch policy."
47+
"description": "Details of a deployment branch or tag policy."
3748
}';
3849
public const SCHEMA_TITLE = 'Deployment branch policy';
39-
public const SCHEMA_DESCRIPTION = 'Details of a deployment branch policy.';
50+
public const SCHEMA_DESCRIPTION = 'Details of a deployment branch or tag policy.';
4051
public const SCHEMA_EXAMPLE_DATA = '{
4152
"id": 361471,
4253
"node_id": "MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE=",
43-
"name": "release\\/*"
54+
"name": "release\\/*",
55+
"type": "branch"
4456
}';
4557

4658
/**
47-
* id: The unique identifier of the branch policy.
48-
* name: The name pattern that branches must match in order to deploy to the environment.
59+
* id: The unique identifier of the branch or tag policy.
60+
* name: The name pattern that branches or tags must match in order to deploy to the environment.
61+
* type: Whether this rule targets a branch or tag.
4962
*/
5063
public function __construct(public int|null $id, #[MapFrom('node_id')]
51-
public string|null $nodeId, public string|null $name,)
64+
public string|null $nodeId, public string|null $name, public string|null $type,)
5265
{
5366
}
5467
}

src/Schema/DeploymentBranchPolicyNamePatternWithType.php

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,47 @@
77
final readonly class DeploymentBranchPolicyNamePatternWithType
88
{
99
public const SCHEMA_JSON = '{
10-
"title": "Deployment branch policy name pattern",
10+
"title": "Deployment branch and tag policy name pattern",
1111
"required": [
1212
"name"
1313
],
1414
"type": "object",
1515
"properties": {
1616
"name": {
1717
"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).",
18+
"description": "The name pattern that branches or tags 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).",
1919
"examples": [
2020
"release\\/*"
2121
]
22+
},
23+
"type": {
24+
"enum": [
25+
"branch",
26+
"tag"
27+
],
28+
"type": "string",
29+
"description": "Whether this rule targets a branch or tag",
30+
"examples": [
31+
"branch"
32+
]
2233
}
2334
}
2435
}';
25-
public const SCHEMA_TITLE = 'Deployment branch policy name pattern';
36+
public const SCHEMA_TITLE = 'Deployment branch and tag policy name pattern';
2637
public const SCHEMA_DESCRIPTION = '';
2738
public const SCHEMA_EXAMPLE_DATA = '{
28-
"name": "release\\/*"
39+
"name": "release\\/*",
40+
"type": "branch"
2941
}';
3042

3143
/**
32-
* name: The name pattern that branches must match in order to deploy to the environment.
44+
* name: The name pattern that branches or tags must match in order to deploy to the environment.
3345
3446
Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*`.
3547
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).
48+
* type: Whether this rule targets a branch or tag
3649
*/
37-
public function __construct(public string $name)
50+
public function __construct(public string $name, public string|null $type)
3851
{
3952
}
4053
}

src/Schema/Operations/Repos/ListDeploymentBranchPolicies/Response/ApplicationJson/Ok.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"properties": {
3131
"id": {
3232
"type": "integer",
33-
"description": "The unique identifier of the branch policy.",
33+
"description": "The unique identifier of the branch or tag policy.",
3434
"examples": [
3535
361471
3636
]
@@ -43,13 +43,24 @@
4343
},
4444
"name": {
4545
"type": "string",
46-
"description": "The name pattern that branches must match in order to deploy to the environment.",
46+
"description": "The name pattern that branches or tags must match in order to deploy to the environment.",
4747
"examples": [
4848
"release\\/*"
4949
]
50+
},
51+
"type": {
52+
"enum": [
53+
"branch",
54+
"tag"
55+
],
56+
"type": "string",
57+
"description": "Whether this rule targets a branch or tag.",
58+
"examples": [
59+
"branch"
60+
]
5061
}
5162
},
52-
"description": "Details of a deployment branch policy."
63+
"description": "Details of a deployment branch or tag policy."
5364
}
5465
}
5566
}
@@ -62,12 +73,14 @@
6273
{
6374
"id": 361471,
6475
"node_id": "MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE=",
65-
"name": "release\\/*"
76+
"name": "release\\/*",
77+
"type": "branch"
6678
},
6779
{
6880
"id": 361471,
6981
"node_id": "MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE=",
70-
"name": "release\\/*"
82+
"name": "release\\/*",
83+
"type": "branch"
7184
}
7285
]
7386
}';

0 commit comments

Comments
 (0)