Skip to content

Commit cbc67fb

Browse files
authored
Merge pull request #1514 from php-api-clients/GitHubEnterprise-3.13/from-1.1.4-21328c477fcf59892ec22f32ff4cf8b7-from-1.1.4-21328c477fcf59892ec22f32ff4cf8b7
2 parents baa3831 + 2bf02f3 commit cbc67fb

File tree

4 files changed

+50
-15
lines changed

4 files changed

+50
-15
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "5345cfceb2528e8e91c8d7a675d048be",
2+
"specHash": "21328c477fcf59892ec22f32ff4cf8b7",
33
"generatedFiles": {
44
"files": [
55
{
@@ -13352,7 +13352,7 @@
1335213352
},
1335313353
{
1335413354
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/Announcement.php",
13355-
"hash": "ed48464cd8270d4a00c01d374b178871"
13355+
"hash": "27e458c6880ea55a7ce64b936f2e8c49"
1335613356
},
1335713357
{
1335813358
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Schema\/LicenseInfo.php",
@@ -27168,7 +27168,7 @@
2716827168
},
2716927169
{
2717027170
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php",
27171-
"hash": "8e5ed19636edd3f61c268f23d3dba92d"
27171+
"hash": "3969d0c96e854589ccfd64812d38dcba"
2717227172
},
2717327173
{
2717427174
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Operation\/SecurityAdvisories.php",
@@ -27748,7 +27748,7 @@
2774827748
},
2774927749
{
2775027750
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprise\/Announcement.php",
27751-
"hash": "2031eff3f5c8d7209048e852b5c84031"
27751+
"hash": "5e98612b79dbbc66f8c8e936476d0875"
2775227752
},
2775327753
{
2775427754
"name": ".\/clients\/GitHubEnterprise-3.13\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprise\/Settings\/License.php",

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

Lines changed: 19 additions & 0 deletions
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.13/src/Schema/Announcement.php

Lines changed: 16 additions & 2 deletions
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.13/current.spec.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33069,7 +33069,7 @@ paths:
3306933069
"$ref": "#/components/responses/validation_failed"
3307033070
x-github:
3307133071
githubCloudOnly: false
33072-
enabledForGitHubApps: false
33072+
enabledForGitHubApps: true
3307333073
category: reactions
3307433074
subcategory: reactions
3307533075
"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}":
@@ -68170,6 +68170,14 @@ components:
6817068170
`null`, or set it to an empty string.'
6817168171
examples:
6817268172
- '"2021-01-01T00:00:00.000-07:00"'
68173+
announcement-user-dismissible:
68174+
type:
68175+
- boolean
68176+
- 'null'
68177+
description: Whether an announcement can be dismissed by the user.
68178+
default: false
68179+
examples:
68180+
- false
6817368181
announcement:
6817468182
title: Enterprise Announcement
6817568183
description: Enterprise global announcement
@@ -68179,6 +68187,8 @@ components:
6817968187
"$ref": "#/components/schemas/announcement-message"
6818068188
expires_at:
6818168189
"$ref": "#/components/schemas/announcement-expiration"
68190+
user_dismissible:
68191+
"$ref": "#/components/schemas/announcement-user-dismissible"
6818268192
required:
6818368193
- announcement
6818468194
license-info:
@@ -73261,14 +73271,6 @@ components:
7326173271
- created_at
7326273272
- updated_at
7326373273
- visibility
73264-
announcement-user-dismissible:
73265-
type:
73266-
- boolean
73267-
- 'null'
73268-
description: Whether an announcement can be dismissed by the user.
73269-
default: false
73270-
examples:
73271-
- false
7327273274
announcement-banner:
7327373275
title: Announcement Banner
7327473276
description: Announcement at either the repository, organization, or enterprise

0 commit comments

Comments
 (0)