Skip to content

Commit 881401d

Browse files
authored
Merge pull request #1515 from php-api-clients/GitHubEnterprise-3.14/from-1.1.4-f5ae341048327f8fa2b6a1ba017066cc-from-1.1.4-f5ae341048327f8fa2b6a1ba017066cc
2 parents cbc67fb + a450545 commit 881401d

File tree

4 files changed

+50
-15
lines changed

4 files changed

+50
-15
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "dc977c8003154234e7a787ec7b8ad5db",
2+
"specHash": "f5ae341048327f8fa2b6a1ba017066cc",
33
"generatedFiles": {
44
"files": [
55
{
@@ -13516,7 +13516,7 @@
1351613516
},
1351713517
{
1351813518
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/Announcement.php",
13519-
"hash": "43d88c2fe6d9b323473405dbb6d7cbe7"
13519+
"hash": "fc94b9b02ef56f864c859e9d58d3ce45"
1352013520
},
1352113521
{
1352213522
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Schema\/LicenseInfo.php",
@@ -27464,7 +27464,7 @@
2746427464
},
2746527465
{
2746627466
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
27467-
"hash": "8e5ed19636edd3f61c268f23d3dba92d"
27467+
"hash": "3969d0c96e854589ccfd64812d38dcba"
2746827468
},
2746927469
{
2747027470
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Operation\/SecurityAdvisories.php",
@@ -28048,7 +28048,7 @@
2804828048
},
2804928049
{
2805028050
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprise\/Announcement.php",
28051-
"hash": "2031eff3f5c8d7209048e852b5c84031"
28051+
"hash": "5e98612b79dbbc66f8c8e936476d0875"
2805228052
},
2805328053
{
2805428054
"name": ".\/clients\/GitHubEnterprise-3.14\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprise\/Settings\/License.php",

clients/GitHubEnterprise-3.14/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.14/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.14/current.spec.yaml

+11-9
Original file line numberDiff line numberDiff line change
@@ -33688,7 +33688,7 @@ paths:
3368833688
"$ref": "#/components/responses/validation_failed"
3368933689
x-github:
3369033690
githubCloudOnly: false
33691-
enabledForGitHubApps: false
33691+
enabledForGitHubApps: true
3369233692
category: reactions
3369333693
subcategory: reactions
3369433694
"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}":
@@ -69130,6 +69130,14 @@ components:
6913069130
`null`, or set it to an empty string.'
6913169131
examples:
6913269132
- '"2021-01-01T00:00:00.000-07:00"'
69133+
announcement-user-dismissible:
69134+
type:
69135+
- boolean
69136+
- 'null'
69137+
description: Whether an announcement can be dismissed by the user.
69138+
default: false
69139+
examples:
69140+
- false
6913369141
announcement:
6913469142
title: Enterprise Announcement
6913569143
description: Enterprise global announcement
@@ -69139,6 +69147,8 @@ components:
6913969147
"$ref": "#/components/schemas/announcement-message"
6914069148
expires_at:
6914169149
"$ref": "#/components/schemas/announcement-expiration"
69150+
user_dismissible:
69151+
"$ref": "#/components/schemas/announcement-user-dismissible"
6914269152
required:
6914369153
- announcement
6914469154
license-info:
@@ -74239,14 +74249,6 @@ components:
7423974249
- created_at
7424074250
- updated_at
7424174251
- visibility
74242-
announcement-user-dismissible:
74243-
type:
74244-
- boolean
74245-
- 'null'
74246-
description: Whether an announcement can be dismissed by the user.
74247-
default: false
74248-
examples:
74249-
- false
7425074252
announcement-banner:
7425174253
title: Announcement Banner
7425274254
description: Announcement at either the repository, organization, or enterprise

0 commit comments

Comments
 (0)