Skip to content

Commit c750674

Browse files
WyriHaximusgithub-actions[bot]
authored andcommitted
[GitHubEnterpriseCloud] Update to 1.1.4-13776516632b8263e4016cfcc797d2c2 from 1.1.4-072d2f6c7487ad40fc77b21845ea28e8
Detected Schema changes: 2025-01-17 20:27:10 ERROR unable to open the rolodex file, check specification references and base path ├ file: /__w/github-root/github-root/server-statistics-actions.yaml └ error: open /__w/github-root/github-root/server-statistics-actions.yaml: no such file or directory 2025-01-17 20:27:10 ERROR unable to open the rolodex file, check specification references and base path ├ file: /__w/github-root/github-root/server-statistics-packages.yaml └ error: open /__w/github-root/github-root/server-statistics-packages.yaml: no such file or directory 2025-01-17 20:27:10 ERROR unable to open the rolodex file, check specification references and base path ├ file: /__w/github-root/github-root/server-statistics-advisory-db.yaml └ error: open /__w/github-root/github-root/server-statistics-advisory-db.yaml: no such file or directory 2025-01-17 20:27:12 ERROR unable to open the rolodex file, check specification references and base path ├ file: /__w/github-root/github-root/server-statistics-actions.yaml └ error: open /__w/github-root/github-root/server-statistics-actions.yaml: no such file or directory 2025-01-17 20:27:12 ERROR unable to open the rolodex file, check specification references and base path ├ file: /__w/github-root/github-root/server-statistics-packages.yaml └ error: open /__w/github-root/github-root/server-statistics-packages.yaml: no such file or directory 2025-01-17 20:27:12 ERROR unable to open the rolodex file, check specification references and base path ├ file: /__w/github-root/github-root/server-statistics-advisory-db.yaml └ error: open /__w/github-root/github-root/server-statistics-advisory-db.yaml: no such file or directory ERROR: component `server-statistics-actions.yaml` does not exist in the specification ERROR: component `server-statistics-packages.yaml` does not exist in the specification ERROR: component `server-statistics-advisory-db.yaml` does not exist in the specification ERROR: cannot resolve reference `server-statistics-actions.yaml`, it's missing: [214277:11] ERROR: cannot resolve reference `server-statistics-packages.yaml`, it's missing: [214279:11] ERROR: cannot resolve reference `server-statistics-advisory-db.yaml`, it's missing: [214281:11] ERROR: component `server-statistics-actions.yaml` does not exist in the specification ERROR: component `server-statistics-packages.yaml` does not exist in the specification ERROR: component `server-statistics-advisory-db.yaml` does not exist in the specification ERROR: cannot resolve reference `server-statistics-actions.yaml`, it's missing: [213071:11] ERROR: cannot resolve reference `server-statistics-packages.yaml`, it's missing: [213073:11] ERROR: cannot resolve reference `server-statistics-advisory-db.yaml`, it's missing: [213075:11]
1 parent fa41a79 commit c750674

File tree

262 files changed

+30281
-9511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+30281
-9511
lines changed

clients/GitHubEnterpriseCloud/README.md

Lines changed: 446 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 608 additions & 148 deletions
Large diffs are not rendered by default.

clients/GitHubEnterpriseCloud/src/Client.php

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

clients/GitHubEnterpriseCloud/src/ClientInterface.php

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace ApiClients\Client\GitHubEnterpriseCloud\Internal\Attribute\CastUnionToType\Schema\Integration;
6+
7+
use ApiClients\Client\GitHubEnterpriseCloud\Schema;
8+
use Attribute;
9+
use EventSauce\ObjectHydrator\ObjectMapper;
10+
use EventSauce\ObjectHydrator\PropertyCaster;
11+
use Throwable;
12+
13+
use function array_keys;
14+
use function array_unique;
15+
use function implode;
16+
use function is_array;
17+
use function sort;
18+
19+
#[Attribute(Attribute::TARGET_PARAMETER)]
20+
final class Owner implements PropertyCaster
21+
{
22+
public function cast(mixed $value, ObjectMapper $hydrator): mixed
23+
{
24+
if (is_array($value)) {
25+
$signatureChunks = array_unique(array_keys($value));
26+
sort($signatureChunks);
27+
$signature = implode('|', $signatureChunks);
28+
if ($signature === 'avatar_url|email|events_url|followers_url|following_url|gists_url|gravatar_id|html_url|id|login|name|node_id|organizations_url|received_events_url|repos_url|site_admin|starred_at|starred_url|subscriptions_url|type|url|user_view_type') {
29+
try {
30+
return $hydrator->hydrateObject(Schema\SimpleUser::class, $value);
31+
} catch (Throwable) {
32+
}
33+
}
34+
35+
if ($signature === 'avatar_url|created_at|description|html_url|id|name|node_id|slug|updated_at|website_url') {
36+
try {
37+
return $hydrator->hydrateObject(Schema\Enterprise::class, $value);
38+
} catch (Throwable) {
39+
}
40+
}
41+
}
42+
43+
return $value;
44+
}
45+
}

0 commit comments

Comments
 (0)