Skip to content

Commit ccaa3eb

Browse files
authored
Merge pull request #1516 from php-api-clients/GitHubEnterprise-3.15/from-1.1.4-6ea130cb5afd29dda26a543a1de89424-from-1.1.4-6ea130cb5afd29dda26a543a1de89424
2 parents 881401d + cb09ade commit ccaa3eb

File tree

4 files changed

+50
-15
lines changed

4 files changed

+50
-15
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "b323588c4cb3168432ec55824c9b764c",
2+
"specHash": "6ea130cb5afd29dda26a543a1de89424",
33
"generatedFiles": {
44
"files": [
55
{
@@ -13544,7 +13544,7 @@
1354413544
},
1354513545
{
1354613546
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/Announcement.php",
13547-
"hash": "7820e487bef8ae9be3f4be30ae0e3387"
13547+
"hash": "dfde9804d8140fe4092466dec23ad5a3"
1354813548
},
1354913549
{
1355013550
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Schema\/LicenseInfo.php",
@@ -27444,7 +27444,7 @@
2744427444
},
2744527445
{
2744627446
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
27447-
"hash": "7283ab444baadbfc831c091e6cd63c0d"
27447+
"hash": "c41e1e5ed253f0c166d3e55aeb3f84e0"
2744827448
},
2744927449
{
2745027450
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Operation\/SecurityAdvisories.php",
@@ -28032,7 +28032,7 @@
2803228032
},
2803328033
{
2803428034
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprise\/Announcement.php",
28035-
"hash": "2031eff3f5c8d7209048e852b5c84031"
28035+
"hash": "5e98612b79dbbc66f8c8e936476d0875"
2803628036
},
2803728037
{
2803828038
"name": ".\/clients\/GitHubEnterprise-3.15\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprise\/Settings\/License.php",

clients/GitHubEnterprise-3.15/src/Internal/Hydrator/Operation/Enterprise/Announcement.php

+19
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterprise⚡️Schema
6868
$properties['expiresAt'] = $value;
6969

7070
after_expiresAt:
71+
72+
$value = $payload['user_dismissible'] ?? null;
73+
74+
if ($value === null) {
75+
$properties['userDismissible'] = null;
76+
goto after_userDismissible;
77+
}
78+
79+
$properties['userDismissible'] = $value;
80+
81+
after_userDismissible:
7182
} catch (Throwable $exception) {
7283
throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterprise\Schema\Announcement', $exception, stack: $this->hydrationStack);
7384
}
@@ -198,6 +209,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterprise⚡
198209

199210
after_expiresAt: $result['expires_at'] = $expiresAt;
200211

212+
$userDismissible = $object->userDismissible;
213+
214+
if ($userDismissible === null) {
215+
goto after_userDismissible;
216+
}
217+
218+
after_userDismissible: $result['user_dismissible'] = $userDismissible;
219+
201220
return $result;
202221
}
203222

clients/GitHubEnterprise-3.15/src/Schema/Announcement.php

+16-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
"examples": [
3636
"\\"2021-01-01T00:00:00.000-07:00\\""
3737
]
38+
},
39+
"user_dismissible": {
40+
"type": [
41+
"boolean",
42+
"null"
43+
],
44+
"description": "Whether an announcement can be dismissed by the user.",
45+
"default": false,
46+
"examples": [
47+
false
48+
]
3849
}
3950
},
4051
"description": "Enterprise global announcement"
@@ -43,15 +54,18 @@
4354
public const SCHEMA_DESCRIPTION = 'Enterprise global announcement';
4455
public const SCHEMA_EXAMPLE_DATA = '{
4556
"announcement": "Very **important** announcement about _something_.",
46-
"expires_at": "\\"2021-01-01T00:00:00.000-07:00\\""
57+
"expires_at": "\\"2021-01-01T00:00:00.000-07:00\\"",
58+
"user_dismissible": false
4759
}';
4860

4961
/**
5062
* announcement: The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/[email protected]/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)."
5163
* expiresAt: The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string.
64+
* userDismissible: Whether an announcement can be dismissed by the user.
5265
*/
5366
public function __construct(public string|null $announcement, #[MapFrom('expires_at')]
54-
public string|null $expiresAt,)
67+
public string|null $expiresAt, #[MapFrom('user_dismissible')]
68+
public bool|null $userDismissible,)
5569
{
5670
}
5771
}

etc/specs/GitHubEnterprise-3.15/current.spec.yaml

+11-9
Original file line numberDiff line numberDiff line change
@@ -34553,7 +34553,7 @@ paths:
3455334553
"$ref": "#/components/responses/validation_failed"
3455434554
x-github:
3455534555
githubCloudOnly: false
34556-
enabledForGitHubApps: false
34556+
enabledForGitHubApps: true
3455734557
category: reactions
3455834558
subcategory: reactions
3455934559
"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}":
@@ -69539,6 +69539,14 @@ components:
6953969539
`null`, or set it to an empty string.'
6954069540
examples:
6954169541
- '"2021-01-01T00:00:00.000-07:00"'
69542+
announcement-user-dismissible:
69543+
type:
69544+
- boolean
69545+
- 'null'
69546+
description: Whether an announcement can be dismissed by the user.
69547+
default: false
69548+
examples:
69549+
- false
6954269550
announcement:
6954369551
title: Enterprise Announcement
6954469552
description: Enterprise global announcement
@@ -69548,6 +69556,8 @@ components:
6954869556
"$ref": "#/components/schemas/announcement-message"
6954969557
expires_at:
6955069558
"$ref": "#/components/schemas/announcement-expiration"
69559+
user_dismissible:
69560+
"$ref": "#/components/schemas/announcement-user-dismissible"
6955169561
required:
6955269562
- announcement
6955369563
license-info:
@@ -74662,14 +74672,6 @@ components:
7466274672
- created_at
7466374673
- updated_at
7466474674
- visibility
74665-
announcement-user-dismissible:
74666-
type:
74667-
- boolean
74668-
- 'null'
74669-
description: Whether an announcement can be dismissed by the user.
74670-
default: false
74671-
examples:
74672-
- false
7467374675
announcement-banner:
7467474676
title: Announcement Banner
7467574677
description: Announcement at either the repository, organization, or enterprise

0 commit comments

Comments
 (0)