Skip to content

Commit b44ace9

Browse files
authored
Merge pull request #1314 from php-api-clients/GitHubEnterpriseCloud/from-1.1.4-3d6ad7276957d3dd8952df409fac0650-from-1.1.4-3d6ad7276957d3dd8952df409fac0650
2 parents 30f538a + a6e8ec0 commit b44ace9

26 files changed

+180
-137
lines changed

clients/GitHubEnterpriseCloud/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9520,6 +9520,7 @@ Using the `call` method:
95209520
```php
95219521
$client->call('GET /orgs/{org}/rulesets', [
95229522
'org' => 'generated',
9523+
'targets' => 'generated',
95239524
'per_page' => 8,
95249525
'page' => 1,
95259526
]);
@@ -9528,6 +9529,7 @@ $client->call('GET /orgs/{org}/rulesets', [
95289529
Operations method:
95299530
```php
95309531
$client->operations()->repos()->getOrgRulesets( org: 'generated',
9532+
targets: 'generated',
95319533
per_page: 8,
95329534
page: 1,
95339535
);
@@ -9544,6 +9546,7 @@ Using the `call` method:
95449546
```php
95459547
$client->call('LIST /orgs/{org}/rulesets', [
95469548
'org' => 'generated',
9549+
'targets' => 'generated',
95479550
'per_page' => 8,
95489551
'page' => 1,
95499552
]);
@@ -9552,6 +9555,7 @@ $client->call('LIST /orgs/{org}/rulesets', [
95529555
Operations method:
95539556
```php
95549557
$client->operations()->repos()->getOrgRulesetsListing( org: 'generated',
9558+
targets: 'generated',
95559559
per_page: 8,
95569560
page: 1,
95579561
);
@@ -23424,6 +23428,7 @@ Using the `call` method:
2342423428
$client->call('GET /repos/{owner}/{repo}/rulesets', [
2342523429
'owner' => 'generated',
2342623430
'repo' => 'generated',
23431+
'targets' => 'generated',
2342723432
'per_page' => 8,
2342823433
'page' => 1,
2342923434
'includes_parents' => ,
@@ -23434,6 +23439,7 @@ Operations method:
2343423439
```php
2343523440
$client->operations()->repos()->getRepoRulesets( owner: 'generated',
2343623441
repo: 'generated',
23442+
targets: 'generated',
2343723443
per_page: 8,
2343823444
page: 1,
2343923445
includes_parents: ,
@@ -23452,6 +23458,7 @@ Using the `call` method:
2345223458
$client->call('LIST /repos/{owner}/{repo}/rulesets', [
2345323459
'owner' => 'generated',
2345423460
'repo' => 'generated',
23461+
'targets' => 'generated',
2345523462
'per_page' => 8,
2345623463
'page' => 1,
2345723464
'includes_parents' => ,
@@ -23462,6 +23469,7 @@ Operations method:
2346223469
```php
2346323470
$client->operations()->repos()->getRepoRulesetsListing( owner: 'generated',
2346423471
repo: 'generated',
23472+
targets: 'generated',
2346523473
per_page: 8,
2346623474
page: 1,
2346723475
includes_parents: ,

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

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"specHash": "b756a9c2ae79f483113462f9d47c6cbf",
2+
"specHash": "3d6ad7276957d3dd8952df409fac0650",
33
"generatedFiles": {
44
"files": [
55
{
@@ -488,7 +488,7 @@
488488
},
489489
{
490490
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/OrganizationFull.php",
491-
"hash": "04d76489e932f9f7b21ed78c22f5880a"
491+
"hash": "dd50b637e99b96a649446ab5b58cc42e"
492492
},
493493
{
494494
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/ActionsCacheUsageByRepository.php",
@@ -5948,7 +5948,7 @@
59485948
},
59495949
{
59505950
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Orgs.php",
5951-
"hash": "160360639ec84ebfb60d4e4a8483a072"
5951+
"hash": "fa6719d3b16d3c7ed97317f8143119da"
59525952
},
59535953
{
59545954
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Oidc.php",
@@ -5980,7 +5980,7 @@
59805980
},
59815981
{
59825982
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Repos.php",
5983-
"hash": "e3d0fb7bf6fdae24d5c77c192f75dddc"
5983+
"hash": "b0b431a98a12675610f1f1dc6949bbae"
59845984
},
59855985
{
59865986
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Reactions.php",
@@ -16532,27 +16532,27 @@
1653216532
},
1653316533
{
1653416534
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetOrgRulesets.php",
16535-
"hash": "8455dcda608622ff162deea94c8fa34f"
16535+
"hash": "f73ad17b9d45e93d522ceaa1391957c5"
1653616536
},
1653716537
{
1653816538
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetOrgRulesets.php",
16539-
"hash": "8b382dcfec8d12101d66242494ef379a"
16539+
"hash": "74a543706ece80469496b24e8f95af38"
1654016540
},
1654116541
{
1654216542
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetOrgRulesetsTest.php",
16543-
"hash": "a56b53ffc3041464c24e76de0599999f"
16543+
"hash": "b68cda945cafadc5151c3409848f6861"
1654416544
},
1654516545
{
1654616546
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetOrgRulesetsListing.php",
16547-
"hash": "2a27a8d2390bb7ee3b2aabcfee7ac4c7"
16547+
"hash": "ae34d53a90f9b11f58ae2967e3494396"
1654816548
},
1654916549
{
1655016550
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetOrgRulesetsListing.php",
16551-
"hash": "8ae7a6d6324a3f78331cb73069e48185"
16551+
"hash": "d752495e4ef36119d5706f2bc95d1509"
1655216552
},
1655316553
{
1655416554
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetOrgRulesetsListingTest.php",
16555-
"hash": "59c5a34aaa531b6fa7657478c31a48af"
16555+
"hash": "55b3ad37153666320738174e11e27ce5"
1655616556
},
1655716557
{
1655816558
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/CreateOrgRuleset.php",
@@ -22528,27 +22528,27 @@
2252822528
},
2252922529
{
2253022530
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRulesets.php",
22531-
"hash": "484c0514030654d2d4f7dc2a8fdd6617"
22531+
"hash": "2d40749386c5482052e0ed90ca469439"
2253222532
},
2253322533
{
2253422534
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesets.php",
22535-
"hash": "3a81fe553f0cef79740ba3be7ce5b90c"
22535+
"hash": "89f03bda37028294883ee5896d9a8355"
2253622536
},
2253722537
{
2253822538
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetsTest.php",
22539-
"hash": "8e3e0609de792b2b717d76014a40ce33"
22539+
"hash": "4980f54550448912ad4b7c26832568b9"
2254022540
},
2254122541
{
2254222542
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/GetRepoRulesetsListing.php",
22543-
"hash": "9fea24ce37b0f0e879536cbe18d7bd20"
22543+
"hash": "6cee22c78bdb32a436bdf842cc9e1c33"
2254422544
},
2254522545
{
2254622546
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Repos\/GetRepoRulesetsListing.php",
22547-
"hash": "0f4ef33226c88f6d0fb6f4d718c3c1c6"
22547+
"hash": "46eec8393b15165c41395318082b1056"
2254822548
},
2254922549
{
2255022550
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Repos\/GetRepoRulesetsListingTest.php",
22551-
"hash": "06a5f48c60a283354502aaf8cfbd6940"
22551+
"hash": "28ac9f529b424b773bb9e7459af42f14"
2255222552
},
2255322553
{
2255422554
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Repos\/CreateRepoRuleset.php",
@@ -26088,7 +26088,7 @@
2608826088
},
2608926089
{
2609026090
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Repos.php",
26091-
"hash": "76b69033138f291aa2775258778751e5"
26091+
"hash": "8640078db9651f7aa01b565d4c57671a"
2609226092
},
2609326093
{
2609426094
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Users.php",
@@ -26400,7 +26400,7 @@
2640026400
},
2640126401
{
2640226402
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Repos.php",
26403-
"hash": "623934de7b82e97f0bfb220ac1a80422"
26403+
"hash": "e0e5c7d34689989da7c3d7566916e5b4"
2640426404
},
2640526405
{
2640626406
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Activity.php",
@@ -26636,11 +26636,11 @@
2663626636
},
2663726637
{
2663826638
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Four.php",
26639-
"hash": "84baabab6ef8bb8c8b3c3f087fdfd342"
26639+
"hash": "5bd0031a3b2f9afae4c837b0244f74dc"
2664026640
},
2664126641
{
2664226642
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php",
26643-
"hash": "cb7d826c43fe180e6b9f6268536b74bc"
26643+
"hash": "d2310762aafa9b401ca1fa40ea24d8bf"
2664426644
},
2664526645
{
2664626646
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php",
@@ -26736,11 +26736,11 @@
2673626736
},
2673726737
{
2673826738
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Four.php",
26739-
"hash": "603ef2017db782aa7bb02ff55436588f"
26739+
"hash": "9dabdc8620df1aefb28d11c639a05a65"
2674026740
},
2674126741
{
2674226742
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php",
26743-
"hash": "dc880ef38a537e30963c81bc90d8075f"
26743+
"hash": "fcd8e2a8f837d56c56a00a017d923e62"
2674426744
},
2674526745
{
2674626746
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php",
@@ -27144,7 +27144,7 @@
2714427144
},
2714527145
{
2714627146
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org.php",
27147-
"hash": "b70c69ec5194dc0b1f71240b4854c487"
27147+
"hash": "21f8577bb4fa1a65a064addf792ac483"
2714827148
},
2714927149
{
2715027150
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Cache\/Usage.php",
@@ -29820,11 +29820,11 @@
2982029820
},
2982129821
{
2982229822
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php",
29823-
"hash": "d4327cff15ed6791470ae0084e08653d"
29823+
"hash": "1685ffac718c21aa115cb0b39c27c094"
2982429824
},
2982529825
{
2982629826
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php",
29827-
"hash": "8b24c3d0b4051f8068328f06fbbc0f44"
29827+
"hash": "61a263e8f319b58062089a83140af8f7"
2982829828
},
2982929829
{
2983029830
"name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon",

clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -395,17 +395,6 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S
395395

396396
after_diskUsage:
397397

398-
$value = $payload['collaborators'] ?? null;
399-
400-
if ($value === null) {
401-
$properties['collaborators'] = null;
402-
goto after_collaborators;
403-
}
404-
405-
$properties['collaborators'] = $value;
406-
407-
after_collaborators:
408-
409398
$value = $payload['billing_email'] ?? null;
410399

411400
if ($value === null) {
@@ -1106,14 +1095,6 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou
11061095

11071096
after_diskUsage: $result['disk_usage'] = $diskUsage;
11081097

1109-
$collaborators = $object->collaborators;
1110-
1111-
if ($collaborators === null) {
1112-
goto after_collaborators;
1113-
}
1114-
1115-
after_collaborators: $result['collaborators'] = $collaborators;
1116-
11171098
$billingEmail = $object->billingEmail;
11181099

11191100
if ($billingEmail === null) {

clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/GetOrgRulesets.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,27 @@ final class GetOrgRulesets
2727
public const OPERATION_MATCH = 'GET /orgs/{org}/rulesets';
2828
/**The organization name. The name is not case sensitive. **/
2929
private string $org;
30+
/**A comma-separated list of rule targets to filter by.
31+
If provided, only rulesets that apply to the specified targets will be returned.
32+
For example, `branch,tag,push`.
33+
**/
34+
private string $targets;
3035
/**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
3136
private int $perPage;
3237
/**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
3338
private int $page;
3439

35-
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets $hydrator, string $org, int $perPage = 30, int $page = 1)
40+
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets $hydrator, string $org, string $targets, int $perPage = 30, int $page = 1)
3641
{
3742
$this->org = $org;
43+
$this->targets = $targets;
3844
$this->perPage = $perPage;
3945
$this->page = $page;
4046
}
4147

4248
public function createRequest(): RequestInterface
4349
{
44-
return new Request('GET', str_replace(['{org}', '{per_page}', '{page}'], [$this->org, $this->perPage, $this->page], '/orgs/{org}/rulesets' . '?per_page={per_page}&page={page}'));
50+
return new Request('GET', str_replace(['{org}', '{targets}', '{per_page}', '{page}'], [$this->org, $this->targets, $this->perPage, $this->page], '/orgs/{org}/rulesets' . '?targets={targets}&per_page={per_page}&page={page}'));
4551
}
4652

4753
/** @return Observable<Schema\RepositoryRuleset> */

clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/GetOrgRulesetsListing.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,27 @@ final class GetOrgRulesetsListing
2727
public const OPERATION_MATCH = 'LIST /orgs/{org}/rulesets';
2828
/**The organization name. The name is not case sensitive. **/
2929
private string $org;
30+
/**A comma-separated list of rule targets to filter by.
31+
If provided, only rulesets that apply to the specified targets will be returned.
32+
For example, `branch,tag,push`.
33+
**/
34+
private string $targets;
3035
/**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
3136
private int $perPage;
3237
/**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
3338
private int $page;
3439

35-
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets $hydrator, string $org, int $perPage = 30, int $page = 1)
40+
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Orgs\Org\Rulesets $hydrator, string $org, string $targets, int $perPage = 30, int $page = 1)
3641
{
3742
$this->org = $org;
43+
$this->targets = $targets;
3844
$this->perPage = $perPage;
3945
$this->page = $page;
4046
}
4147

4248
public function createRequest(): RequestInterface
4349
{
44-
return new Request('GET', str_replace(['{org}', '{per_page}', '{page}'], [$this->org, $this->perPage, $this->page], '/orgs/{org}/rulesets' . '?per_page={per_page}&page={page}'));
50+
return new Request('GET', str_replace(['{org}', '{targets}', '{per_page}', '{page}'], [$this->org, $this->targets, $this->perPage, $this->page], '/orgs/{org}/rulesets' . '?targets={targets}&per_page={per_page}&page={page}'));
4551
}
4652

4753
/** @return Observable<Schema\RepositoryRuleset> */

clients/GitHubEnterpriseCloud/src/Internal/Operation/Repos/GetRepoRulesets.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,31 @@ final class GetRepoRulesets
2929
private string $owner;
3030
/**The name of the repository without the `.git` extension. The name is not case sensitive. **/
3131
private string $repo;
32+
/**A comma-separated list of rule targets to filter by.
33+
If provided, only rulesets that apply to the specified targets will be returned.
34+
For example, `branch,tag,push`.
35+
**/
36+
private string $targets;
3237
/**The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
3338
private int $perPage;
3439
/**The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." **/
3540
private int $page;
3641
/**Include rulesets configured at higher levels that apply to this repository **/
3742
private bool $includesParents;
3843

39-
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets $hydrator, string $owner, string $repo, int $perPage = 30, int $page = 1, bool $includesParents = true)
44+
public function __construct(private readonly SchemaValidator $responseSchemaValidator, private readonly Internal\Hydrator\Operation\Repos\Owner\Repo\Rulesets $hydrator, string $owner, string $repo, string $targets, int $perPage = 30, int $page = 1, bool $includesParents = true)
4045
{
4146
$this->owner = $owner;
4247
$this->repo = $repo;
48+
$this->targets = $targets;
4349
$this->perPage = $perPage;
4450
$this->page = $page;
4551
$this->includesParents = $includesParents;
4652
}
4753

4854
public function createRequest(): RequestInterface
4955
{
50-
return new Request('GET', str_replace(['{owner}', '{repo}', '{per_page}', '{page}', '{includes_parents}'], [$this->owner, $this->repo, $this->perPage, $this->page, $this->includesParents], '/repos/{owner}/{repo}/rulesets' . '?per_page={per_page}&page={page}&includes_parents={includes_parents}'));
56+
return new Request('GET', str_replace(['{owner}', '{repo}', '{targets}', '{per_page}', '{page}', '{includes_parents}'], [$this->owner, $this->repo, $this->targets, $this->perPage, $this->page, $this->includesParents], '/repos/{owner}/{repo}/rulesets' . '?targets={targets}&per_page={per_page}&page={page}&includes_parents={includes_parents}'));
5157
}
5258

5359
/** @return Observable<Schema\RepositoryRuleset> */

0 commit comments

Comments
 (0)