From 57d0a34b72c081db27c5b60afa57c770c4a30780 Mon Sep 17 00:00:00 2001 From: WyriHaximus <147145+WyriHaximus@users.noreply.github.com> Date: Wed, 5 Feb 2025 21:00:50 +0000 Subject: [PATCH] =?UTF-8?q?[GitHubEnterpriseCloud]=20Update=20to=201.1.4-3?= =?UTF-8?q?2b56e406f1dadb0fc98a659a70af16f=20from=201.1.4-6310f3f2eedbd730?= =?UTF-8?q?69379065089ad197=20Detected=20Schema=20changes:=202025-02-05=20?= =?UTF-8?q?20:28:52=20ERROR=20unable=20to=20open=20the=20rolodex=20file,?= =?UTF-8?q?=20check=20specification=20references=20and=20base=20path=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=9C=20file:=20/=5F=5Fw/github-root/github-root/server-sta?= =?UTF-8?q?tistics-actions.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F=5Fw?= =?UTF-8?q?/github-root/github-root/server-statistics-actions.yaml:=20no?= =?UTF-8?q?=20such=20file=20or=20directory=202025-02-05=2020:28:52=20ERROR?= =?UTF-8?q?=20unable=20to=20open=20the=20rolodex=20file,=20check=20specifi?= =?UTF-8?q?cation=20references=20and=20base=20path=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20file:?= =?UTF-8?q?=20/=5F=5Fw/github-root/github-root/server-statistics-packages.?= =?UTF-8?q?yaml=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=E2=94=94=20error:=20open=20/=5F=5Fw/github-root/gi?= =?UTF-8?q?thub-root/server-statistics-packages.yaml:=20no=20such=20file?= =?UTF-8?q?=20or=20directory=202025-02-05=2020:28:52=20ERROR=20unable=20to?= =?UTF-8?q?=20open=20the=20rolodex=20file,=20check=20specification=20refer?= =?UTF-8?q?ences=20and=20base=20path=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20file:=20/=5F=5Fw/g?= =?UTF-8?q?ithub-root/github-root/server-statistics-advisory-db.yaml=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=E2=94=94=20error:=20open=20/=5F=5Fw/github-root/github-root/se?= =?UTF-8?q?rver-statistics-advisory-db.yaml:=20no=20such=20file=20or=20dir?= =?UTF-8?q?ectory=202025-02-05=2020:28:54=20ERROR=20unable=20to=20open=20t?= =?UTF-8?q?he=20rolodex=20file,=20check=20specification=20references=20and?= =?UTF-8?q?=20base=20path=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=E2=94=9C=20file:=20/=5F=5Fw/github-root/g?= =?UTF-8?q?ithub-root/server-statistics-actions.yaml=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=94=20err?= =?UTF-8?q?or:=20open=20/=5F=5Fw/github-root/github-root/server-statistics?= =?UTF-8?q?-actions.yaml:=20no=20such=20file=20or=20directory=202025-02-05?= =?UTF-8?q?=2020:28:54=20ERROR=20unable=20to=20open=20the=20rolodex=20file?= =?UTF-8?q?,=20check=20specification=20references=20and=20base=20path=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=E2=94=9C=20file:=20/=5F=5Fw/github-root/github-root/server-?= =?UTF-8?q?statistics-packages.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F?= =?UTF-8?q?=5Fw/github-root/github-root/server-statistics-packages.yaml:?= =?UTF-8?q?=20no=20such=20file=20or=20directory=202025-02-05=2020:28:54=20?= =?UTF-8?q?ERROR=20unable=20to=20open=20the=20rolodex=20file,=20check=20sp?= =?UTF-8?q?ecification=20references=20and=20base=20path=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=E2=94=9C=20?= =?UTF-8?q?file:=20/=5F=5Fw/github-root/github-root/server-statistics-advi?= =?UTF-8?q?sory-db.yaml=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=E2=94=94=20error:=20open=20/=5F=5Fw/github-r?= =?UTF-8?q?oot/github-root/server-statistics-advisory-db.yaml:=20no=20such?= =?UTF-8?q?=20file=20or=20directory=20ERROR:=20component=20`server-statist?= =?UTF-8?q?ics-actions.yaml`=20does=20not=20exist=20in=20the=20specificati?= =?UTF-8?q?on=20ERROR:=20component=20`server-statistics-packages.yaml`=20d?= =?UTF-8?q?oes=20not=20exist=20in=20the=20specification=20ERROR:=20compone?= =?UTF-8?q?nt=20`server-statistics-advisory-db.yaml`=20does=20not=20exist?= =?UTF-8?q?=20in=20the=20specification=20ERROR:=20cannot=20resolve=20refer?= =?UTF-8?q?ence=20`server-statistics-actions.yaml`,=20it's=20missing:=20?= =?UTF-8?q?=20[215067:11]=20ERROR:=20cannot=20resolve=20reference=20`serve?= =?UTF-8?q?r-statistics-packages.yaml`,=20it's=20missing:=20=20[215069:11]?= =?UTF-8?q?=20ERROR:=20cannot=20resolve=20reference=20`server-statistics-a?= =?UTF-8?q?dvisory-db.yaml`,=20it's=20missing:=20=20[215071:11]=20ERROR:?= =?UTF-8?q?=20component=20`server-statistics-actions.yaml`=20does=20not=20?= =?UTF-8?q?exist=20in=20the=20specification=20ERROR:=20component=20`server?= =?UTF-8?q?-statistics-packages.yaml`=20does=20not=20exist=20in=20the=20sp?= =?UTF-8?q?ecification=20ERROR:=20component=20`server-statistics-advisory-?= =?UTF-8?q?db.yaml`=20does=20not=20exist=20in=20the=20specification=20ERRO?= =?UTF-8?q?R:=20cannot=20resolve=20reference=20`server-statistics-actions.?= =?UTF-8?q?yaml`,=20it's=20missing:=20=20[215019:11]=20ERROR:=20cannot=20r?= =?UTF-8?q?esolve=20reference=20`server-statistics-packages.yaml`,=20it's?= =?UTF-8?q?=20missing:=20=20[215021:11]=20ERROR:=20cannot=20resolve=20refe?= =?UTF-8?q?rence=20`server-statistics-advisory-db.yaml`,=20it's=20missing:?= =?UTF-8?q?=20=20[215023:11]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clients/GitHubEnterpriseCloud/README.md | 68 ++ .../etc/openapi-client-generator.state | 130 ++-- .../Actions/Runners/GenerateJitconfig.php | 19 + .../Enterprise/Actions/Runners/RunnerId.php | 19 + .../Enterprise/BypassRequests/PushRules.php | 286 ++++++++ .../Org/Actions/Runners/GenerateJitconfig.php | 19 + .../Orgs/Org/Actions/Runners/RunnerId.php | 19 + .../Actions/Runners/GenerateJitconfig.php | 19 + .../Owner/Repo/Actions/Runners/RunnerId.php | 19 + .../src/Internal/Hydrators.php | 10 + .../GenerateRunnerJitconfigForEnterprise.php | 8 + .../Actions/GenerateRunnerJitconfigForOrg.php | 8 + .../GenerateRunnerJitconfigForRepo.php | 8 + .../ListPushBypassRequests.php | 113 ++++ .../ListPushBypassRequestsListing.php | 113 ++++ .../GenerateRunnerJitconfigForEnterprise.php | 1 - .../Actions/GenerateRunnerJitconfigForOrg.php | 1 - .../GenerateRunnerJitconfigForRepo.php | 1 - .../GetGithubBillingUsageReportGhe.php | 1 + .../GetGithubBillingUsageReportOrg.php | 1 + .../ListPushBypassRequests.php | 41 ++ .../ListPushBypassRequestsListing.php | 41 ++ .../src/Internal/Operators.php | 20 + .../src/Internal/Router/Get/Billing.php | 2 + .../Internal/Router/Get/EnterpriseAdmin.php | 57 ++ .../src/Internal/Router/Get/Five.php | 8 +- .../src/Internal/Router/Get/Six.php | 2 +- .../Internal/Router/List/EnterpriseAdmin.php | 63 ++ .../src/Internal/Router/List/Five.php | 10 +- .../src/Internal/Router/Post/Actions.php | 3 - .../src/Internal/Router/Post/Seven.php | 2 +- .../src/Internal/Router/Post/Six.php | 1 + .../src/Operation/Actions.php | 3 - .../src/Operation/Billing.php | 2 + .../src/Operation/EnterpriseAdmin.php | 12 + .../src/PHPStan/ClientCallReturnTypes.php | 18 +- .../TietCADB7922/TietA4382CA1.php} | 13 +- .../Tiet90BDCBBD/Tiet6547B867.php} | 13 +- .../Response/ApplicationJson/Created.php | 6 +- .../Response/ApplicationJson/Ok.php | 2 +- .../Response/ApplicationJson/Ok.php | 2 +- .../ApplicationJson/Ok/Application/Json.php | 2 +- .../Response/ApplicationJson/Ok.php | 2 +- .../ApplicationJson/Ok/Application/Json.php | 2 +- .../Response/ApplicationJson/Ok.php | 9 +- .../Response/ApplicationJson/Ok.php | 2 +- .../src/Schema/Runner.php | 8 +- ...nerateRunnerJitconfigForEnterpriseTest.php | 34 + .../GenerateRunnerJitconfigForOrgTest.php | 34 + .../GenerateRunnerJitconfigForRepoTest.php | 35 + .../ListPushBypassRequestsListingTest.php | 113 ++++ .../ListPushBypassRequestsTest.php | 105 +++ .../tests/Types/ClientCallReturnTypes.php | 12 +- .../GitHubEnterpriseCloud/current.spec.yaml | 615 ++++++++++-------- 54 files changed, 1784 insertions(+), 373 deletions(-) create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/BypassRequests/PushRules.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequests.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListing.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequests.php create mode 100644 clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequestsListing.php rename clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/{Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php => TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php} (94%) rename clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/{Tiet64C370DE/Tiet030B21C9/Tiet0FE13F38/Tiet1E6A295D.php => TietED690D6D/Tiet788B85F7/Tiet90BDCBBD/Tiet6547B867.php} (94%) create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListingTest.php create mode 100644 clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsTest.php diff --git a/clients/GitHubEnterpriseCloud/README.md b/clients/GitHubEnterpriseCloud/README.md index a6619baffd0..25efe2d87a9 100644 --- a/clients/GitHubEnterpriseCloud/README.md +++ b/clients/GitHubEnterpriseCloud/README.md @@ -2132,6 +2132,74 @@ $client->operations()->enterpriseAdmin()->deleteAuditLogStream( enterpris You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/audit-log#delete-an-audit-log-streaming-configuration-for-an-enterprise). +### enterprise-admin/list-push-bypass-requests + +List push rule bypass requests within an enterprise + +Using the `call` method: +```php +$client->call('GET /enterprises/{enterprise}/bypass-requests/push-rules', [ + 'enterprise' => 'generated', + 'organization_name' => 'generated', + 'reviewer' => 'generated', + 'requester' => 'generated', + 'time_period' => 'generated', + 'request_status' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->enterpriseAdmin()->listPushBypassRequests( enterprise: 'generated', + organization_name: 'generated', + reviewer: 'generated', + requester: 'generated', + time_period: 'generated', + request_status: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/bypass-requests#list-push-rule-bypass-requests-within-an-enterprise). + + +### enterprise-admin/list-push-bypass-requests + +List push rule bypass requests within an enterprise + +Using the `call` method: +```php +$client->call('LIST /enterprises/{enterprise}/bypass-requests/push-rules', [ + 'enterprise' => 'generated', + 'organization_name' => 'generated', + 'reviewer' => 'generated', + 'requester' => 'generated', + 'time_period' => 'generated', + 'request_status' => 'generated', + 'per_page' => 8, + 'page' => 1, +]); +``` + +Operations method: +```php +$client->operations()->enterpriseAdmin()->listPushBypassRequestsListing( enterprise: 'generated', + organization_name: 'generated', + reviewer: 'generated', + requester: 'generated', + time_period: 'generated', + request_status: 'generated', + per_page: 8, + page: 1, +); +``` + +You can find more about this operation over at the [API method documentation](https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/bypass-requests#list-push-rule-bypass-requests-within-an-enterprise). + + ### code-scanning/list-alerts-for-enterprise List code scanning alerts for an enterprise diff --git a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state index be8a1b8926e..edf425544b6 100644 --- a/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state +++ b/clients/GitHubEnterpriseCloud/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "6310f3f2eedbd73069379065089ad197", + "specHash": "32b56e406f1dadb0fc98a659a70af16f", "generatedFiles": { "files": [ { @@ -176,7 +176,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Runner.php", - "hash": "c16ff9447d9216b89ea49bed37701651" + "hash": "a86920d4cc301856e816a5a764cfba75" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RunnerApplication.php", @@ -4624,7 +4624,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/EnterpriseAdmin\/ListSelfHostedRunnersInGroupForEnterprise\/Response\/ApplicationJson\/Ok.php", - "hash": "8b7949a9b96984150b5cf577611a13d1" + "hash": "60bd3d73933992f41385282456f30e2f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/EnterpriseAdmin\/SetSelfHostedRunnersInGroupForEnterprise\/Request\/ApplicationJson.php", @@ -4632,7 +4632,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/EnterpriseAdmin\/ListSelfHostedRunnersForEnterprise\/Response\/ApplicationJson\/Ok.php", - "hash": "68411635d67d5a9460b37e7c7c03f317" + "hash": "7210922c04f4fb6a2e4bc1227cd6129f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/EnterpriseAdmin\/ListLabelsForSelfHostedRunnerForEnterprise\/Response\/ApplicationJson\/Ok.php", @@ -4792,7 +4792,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersForOrg\/Response\/ApplicationJson\/Ok.php", - "hash": "9c52355da82fdef199d1767841822999" + "hash": "572c5e9deb36071bc79160da1214c9f5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListOrgSecrets\/Response\/ApplicationJson\/Ok.php", @@ -5880,11 +5880,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/EnterpriseAdmin.php", - "hash": "fdf60e261d5b9d94ec4675c3a75dd50d" + "hash": "b744b1847038dcd89f16c37a085690a2" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Actions.php", - "hash": "b6b8b8c98f62a1fe78108669198e0898" + "hash": "2ecd6e8ea6b594286dcf1047954df164" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/AnnouncementBanners.php", @@ -5904,7 +5904,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Billing.php", - "hash": "0ea7085107dfe3e724f32c3802902939" + "hash": "5540f84230b49c578cb95a1e7b90274a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Operation\/Activity.php", @@ -11310,17 +11310,13 @@ "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/EnterpriseAdmin\/ListOrgAccessToSelfHostedRunnerGroupInEnterprise\/Response\/ApplicationJson\/Ok\/Application\/Json.php", "hash": "164808750d4b0eaf71d72ff2bb0ac657" }, - { - "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet64C370DE\/Tiet030B21C9\/Tiet0FE13F38\/Tiet1E6A295D.php", - "hash": "e91aa2553ad91657bcc134216eb45f99" - }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersInGroupForOrg\/Response\/ApplicationJson\/Ok.php", - "hash": "d349f56ac550004365fd72f6a63e8901" + "hash": "f0a36d16d404f062a6729f84c49b19ef" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersInGroupForOrg\/Response\/ApplicationJson\/Ok\/Application\/Json.php", - "hash": "8a2e50e88b0f5fa2f8bfbaa738ccab2e" + "hash": "32767e693220f7caab9bc37b2d30a647" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietC1ED0A10\/Tiet2CE6A484\/Tiet45FE9908\/TietC65D2293.php", @@ -11502,17 +11498,13 @@ "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Projects\/CreateCard\/Response\/ApplicationJson\/UnprocessableEntity.php", "hash": "5adf17a99a79df86933cb3a2f768205b" }, - { - "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/Tiet2329E85F\/Tiet2404E7BA\/TietF6C81F1C\/Tiet1EE267CF.php", - "hash": "423c36a1317c0aa2107f0fcddec748f4" - }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersForRepo\/Response\/ApplicationJson\/Ok.php", - "hash": "25ee91d75f598a65846a4f15515b028c" + "hash": "437ffc02da379b234ecac916db52eed1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelfHostedRunnersForRepo\/Response\/ApplicationJson\/Ok\/Application\/Json.php", - "hash": "0927ac3cde0fe460de564599e262e80f" + "hash": "a37436637123a7f70adb5c9953ba77a1" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/ListSelectedReposForOrgVariable\/Response\/ApplicationJson\/Ok.php", @@ -12040,7 +12032,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/Operations\/Actions\/GenerateRunnerJitconfigForEnterprise\/Response\/ApplicationJson\/Created.php", - "hash": "3c450d19bb4814d6e48800af487a4b8c" + "hash": "1d861e9875f7f3c9838a2043f46ce6a0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/RepositoryRuleRulesetInfo.php", @@ -13080,15 +13072,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForEnterprise.php", - "hash": "d3e62d03e0367504fd31af9c5be00507" + "hash": "c6fa8b41e374fb10fc409c95bb8492a0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GenerateRunnerJitconfigForEnterprise.php", - "hash": "5f5103470f51dfbc3f4c73fa4a67a620" + "hash": "97e6cd5d0b0fe4252e83014cf26a772d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForEnterpriseTest.php", - "hash": "7f48bf60055322005b8151bae3a9cd6a" + "hash": "a6ce9b51c47c7a3508dbed25c528349e" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/CreateRegistrationTokenForEnterprise.php", @@ -14492,15 +14484,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForOrg.php", - "hash": "154a371b5b9c0e6ab48446c5d9170f1a" + "hash": "eb6d24393f25b09a2f289d3f4700e964" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GenerateRunnerJitconfigForOrg.php", - "hash": "ccdee9448ea053e5aa22831f91bd06fd" + "hash": "3dc141d8803bfc045d95abe1f0bc16c4" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForOrgTest.php", - "hash": "44b9ff4092bcb5823f83739e1da5c309" + "hash": "a0929cd4563458963e18b84304957317" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/CreateRegistrationTokenForOrg.php", @@ -17800,15 +17792,15 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForRepo.php", - "hash": "420ccb0254c722faa43ffa9dee82bf22" + "hash": "4497b3ff01a30de8619a64cb7a40c56b" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Actions\/GenerateRunnerJitconfigForRepo.php", - "hash": "09efca8dde13ddc8b0d030668054cdc9" + "hash": "417a391f279de3b8b871ff3535b8ceb0" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Actions\/GenerateRunnerJitconfigForRepoTest.php", - "hash": "a9e727c8f19860772f4b76ecb655ebe3" + "hash": "3e95c7f2e09edc084d92998930cd65a8" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/Actions\/CreateRegistrationTokenForRepo.php", @@ -26028,7 +26020,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/EnterpriseAdmin.php", - "hash": "94b4f92460243920bd73c560484b12fe" + "hash": "22fc7ed6dc4e25a2cf42993cf2ff2a0d" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/AnnouncementBanners.php", @@ -26060,7 +26052,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Billing.php", - "hash": "faa3b1066ada9ba960eb7902d173784e" + "hash": "11bb51c81b4504aceecc1e75ba097eae" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Checks.php", @@ -26116,7 +26108,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Actions.php", - "hash": "7d5a2d31381ba4e806bc7a7e6df5c267" + "hash": "3fec48f4560f961f3f2b40b55e264ebe" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/EnterpriseAdmin.php", @@ -26312,7 +26304,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/EnterpriseAdmin.php", - "hash": "bad1e05700c7caf60b8d894558a1d9e0" + "hash": "86cb12631218924a32880aa514f18562" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Projects.php", @@ -26540,11 +26532,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Five.php", - "hash": "5418ee2799658e41ccf12f6920f0da08" + "hash": "a91095edd68394452e693661ea645295" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Six.php", - "hash": "40f7ec26b9bdee3ecada75080d69d3d2" + "hash": "37e6aa6f38b79bbc91caa2834520f676" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Get\/Seven.php", @@ -26568,7 +26560,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Six.php", - "hash": "ffc46d6ba42e8136a9a6fbc14c0e6921" + "hash": "f79e6131d891d6d385115cdbfccb3274" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Five.php", @@ -26576,7 +26568,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Seven.php", - "hash": "dbc47411d823cf657800ced04fa86bf5" + "hash": "e15bceaa48df4ca500ff4c2b5bcade21" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/Post\/Two.php", @@ -26640,7 +26632,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Five.php", - "hash": "1487a319e15a897284bf3c54fbfd0855" + "hash": "3e4e5ecd1b7a91007ccbe67a3744f8f5" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Router\/List\/Two.php", @@ -26748,7 +26740,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operators.php", - "hash": "0133c400ea03d8b745d703035f91377b" + "hash": "68dcdd4539f81787222c909c848b488a" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Root.php", @@ -26868,7 +26860,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Actions\/Runners\/GenerateJitconfig.php", - "hash": "00589b643bc7eed29632102e51e459fa" + "hash": "9a0fe90060c53cd583cd54fc626f244c" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Actions\/Runners\/RegistrationToken.php", @@ -26880,7 +26872,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Actions\/Runners\/RunnerId.php", - "hash": "024824940ef4be3e5c9ce18f848a0195" + "hash": "65e98a87d8a07304e04565defe58cf14" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/Actions\/Runners\/RunnerId\/Labels.php", @@ -27096,7 +27088,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/GenerateJitconfig.php", - "hash": "18d8176f079e25cf180fb95cdcc268ba" + "hash": "a524bd7337407f12585c89d164920745" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/RegistrationToken.php", @@ -27108,7 +27100,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/RunnerId.php", - "hash": "a6411887fb1fe8133b44cdee6a773dbe" + "hash": "b209785569db6c29ff0d806020aa72d6" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Orgs\/Org\/Actions\/Runners\/RunnerId\/Labels.php", @@ -27628,7 +27620,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/GenerateJitconfig.php", - "hash": "7195c0aa145659a80f79711d9ef5da25" + "hash": "b36b3962f07e7bdf32739f81e138dd9f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/RegistrationToken.php", @@ -27640,7 +27632,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/RunnerId.php", - "hash": "90f71bcd5e9b04750262468e9bd15e6d" + "hash": "ece7bd311d727fe2fc2898d3776bd2fc" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Repos\/Owner\/Repo\/Actions\/Runners\/RunnerId\/Labels.php", @@ -28920,7 +28912,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "6b8af841fcf31f1b16263cd10bcf3521" + "hash": "2cf42d8924a8b8ba65090a3f66dd5487" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListProvisionedGroupsEnterprise.php", @@ -29716,11 +29708,11 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/PHPStan\/ClientCallReturnTypes.php", - "hash": "48ee1e7a3baf5b590ace247c572e9949" + "hash": "480c123369052eb32ed5ad1e24e966f7" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Types\/ClientCallReturnTypes.php", - "hash": "2989c553314b9b108526da295014532b" + "hash": "b9a716da95ac9f6846132e0f04d3781f" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/..\/etc\/phpstan-extension.neon", @@ -31620,7 +31612,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Billing\/GetGithubBillingUsageReportGhe.php", - "hash": "8d94f4d8a02b18862d0e35e7ea15e7fa" + "hash": "42e26155a339cbc53a66ef10cad95085" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Billing\/GetGithubBillingUsageReportGheTest.php", @@ -33300,7 +33292,7 @@ }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/Billing\/GetGithubBillingUsageReportOrg.php", - "hash": "0083986a636c8e2c2119d1ce95ea161f" + "hash": "ecb3d55f31dda783769f34e1dce72c9b" }, { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/Billing\/GetGithubBillingUsageReportOrgTest.php", @@ -34877,6 +34869,42 @@ { "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietADA0376A\/TietE291E6D1\/Tiet2A83A4E8\/TietFA266CAF.php", "hash": "000b0dd21ac882954539044bb3c03c15" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListPushBypassRequests.php", + "hash": "985b70be62a073e430e134b0fb4797ac" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/EnterpriseAdmin\/ListPushBypassRequests.php", + "hash": "3a2597ab70f055c679ab56bd4d0e050b" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/EnterpriseAdmin\/ListPushBypassRequestsTest.php", + "hash": "43cb614ffd159b896edc6f9ef45f4e05" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operation\/EnterpriseAdmin\/ListPushBypassRequestsListing.php", + "hash": "4615f214453e0730e571c0ed15a60871" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Operator\/EnterpriseAdmin\/ListPushBypassRequestsListing.php", + "hash": "58598359d86a45592cff510f11287dac" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/tests\/\/Internal\/Operation\/EnterpriseAdmin\/ListPushBypassRequestsListingTest.php", + "hash": "9cea04a0018fb20d0989076da6fc4ab3" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietED690D6D\/Tiet788B85F7\/Tiet90BDCBBD\/Tiet6547B867.php", + "hash": "c3a6705643dfda05f10ed4383dad6353" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEAB1E353\/TietA691FF98\/TietCADB7922\/TietA4382CA1.php", + "hash": "88cdb7f352946c3ae41d519660ca21fd" + }, + { + "name": ".\/clients\/GitHubEnterpriseCloud\/etc\/..\/\/src\/\/Internal\/Hydrator\/Operation\/Enterprises\/Enterprise\/BypassRequests\/PushRules.php", + "hash": "fc46c6840c4ca31bd3a6aba508f4cebe" } ] }, diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/GenerateJitconfig.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/GenerateJitconfig.php index dc9f7491e60..a4dc433a21f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/GenerateJitconfig.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/GenerateJitconfig.php @@ -182,6 +182,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -462,6 +473,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/RunnerId.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/RunnerId.php index bc3400e5c64..c06a7173ff1 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/RunnerId.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/Actions/Runners/RunnerId.php @@ -124,6 +124,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -271,6 +282,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/BypassRequests/PushRules.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/BypassRequests/PushRules.php new file mode 100644 index 00000000000..36c4a2929d2 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Enterprises/Enterprise/BypassRequests/PushRules.php @@ -0,0 +1,286 @@ + $className + * + * @return T + * + * @template T of object + */ + public function hydrateObject(string $className, array $payload): object + { + return match ($className) { + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($payload), + default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), + }; + } + + private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(array $payload): BasicError + { + $properties = []; + $missingFields = []; + try { + $value = $payload['message'] ?? null; + + if ($value === null) { + $properties['message'] = null; + goto after_message; + } + + $properties['message'] = $value; + + after_message: + + $value = $payload['documentation_url'] ?? null; + + if ($value === null) { + $properties['documentationUrl'] = null; + goto after_documentationUrl; + } + + $properties['documentationUrl'] = $value; + + after_documentationUrl: + + $value = $payload['url'] ?? null; + + if ($value === null) { + $properties['url'] = null; + goto after_url; + } + + $properties['url'] = $value; + + after_url: + + $value = $payload['status'] ?? null; + + if ($value === null) { + $properties['status'] = null; + goto after_status; + } + + $properties['status'] = $value; + + after_status: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(BasicError::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new BasicError(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError', $exception, stack: $this->hydrationStack); + } + } + + private function serializeViaTypeMap(string $accessor, object $object, array $payloadToTypeMap): array + { + foreach ($payloadToTypeMap as $payloadType => [$valueType, $method]) { + if (is_a($object, $valueType)) { + return [$accessor => $payloadType] + $this->{$method}($object); + } + } + + throw new LogicException('No type mapped for object of class: ' . $object::class); + } + + public function serializeObject(object $object): mixed + { + return $this->serializeObjectOfType($object, $object::class); + } + + /** + * @param T $object + * @param class-string $className + * + * @template T + */ + public function serializeObjectOfType(object $object, string $className): mixed + { + try { + return match ($className) { + 'array' => $this->serializeValuearray($object), + 'Ramsey\Uuid\UuidInterface' => $this->serializeValueRamsey⚡️Uuid⚡️UuidInterface($object), + 'DateTime' => $this->serializeValueDateTime($object), + 'DateTimeImmutable' => $this->serializeValueDateTimeImmutable($object), + 'DateTimeInterface' => $this->serializeValueDateTimeInterface($object), + 'ApiClients\Client\GitHubEnterpriseCloud\Schema\BasicError' => $this->serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError($object), + default => throw new LogicException("No serialization defined for $className"), + }; + } catch (Throwable $exception) { + throw UnableToSerializeObject::dueToError($className, $exception); + } + } + + private function serializeValuearray(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeArrayItems(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueRamsey⚡️Uuid⚡️UuidInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeUuidToString(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTime(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeImmutable(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeValueDateTimeInterface(mixed $value): mixed + { + static $serializer; + + if ($serializer === null) { + $serializer = new SerializeDateTime(...[]); + } + + return $serializer->serialize($value, $this); + } + + private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️Schema⚡️BasicError(mixed $object): mixed + { + assert($object instanceof BasicError); + $result = []; + + $message = $object->message; + + if ($message === null) { + goto after_message; + } + + after_message: $result['message'] = $message; + + $documentationUrl = $object->documentationUrl; + + if ($documentationUrl === null) { + goto after_documentationUrl; + } + + after_documentationUrl: $result['documentation_url'] = $documentationUrl; + + $url = $object->url; + + if ($url === null) { + goto after_url; + } + + after_url: $result['url'] = $url; + + $status = $object->status; + + if ($status === null) { + goto after_status; + } + + after_status: $result['status'] = $status; + + return $result; + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToHydrateObject + * + * @template T + */ + public function hydrateObjects(string $className, iterable $payloads): IterableList + { + return new IterableList($this->doHydrateObjects($className, $payloads)); + } + + private function doHydrateObjects(string $className, iterable $payloads): Generator + { + foreach ($payloads as $index => $payload) { + yield $index => $this->hydrateObject($className, $payload); + } + } + + /** + * @param class-string $className + * @param iterable $payloads; + * + * @return IterableList + * + * @throws UnableToSerializeObject + * + * @template T + */ + public function serializeObjects(iterable $payloads): IterableList + { + return new IterableList($this->doSerializeObjects($payloads)); + } + + private function doSerializeObjects(iterable $objects): Generator + { + foreach ($objects as $index => $object) { + yield $index => $this->serializeObject($object); + } + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php index 420ac736d9b..41e6eec0122 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/GenerateJitconfig.php @@ -182,6 +182,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -462,6 +473,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php index 46db26b3ca1..42fe7e2d313 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Orgs/Org/Actions/Runners/RunnerId.php @@ -124,6 +124,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -271,6 +282,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php index 7a1dcfdbeb7..af2b7009132 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/GenerateJitconfig.php @@ -182,6 +182,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -462,6 +473,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php index 90d8bd4fef7..6955e9eef41 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrator/Operation/Repos/Owner/Repo/Actions/Runners/RunnerId.php @@ -124,6 +124,17 @@ private function hydrateApiClients⚡️Client⚡️GitHubEnterpriseCloud⚡️S $properties['labels'] = $value; after_labels: + + $value = $payload['ephemeral'] ?? null; + + if ($value === null) { + $properties['ephemeral'] = null; + goto after_ephemeral; + } + + $properties['ephemeral'] = $value; + + after_ephemeral: } catch (Throwable $exception) { throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHubEnterpriseCloud\Schema\Runner', $exception, stack: $this->hydrationStack); } @@ -271,6 +282,14 @@ private function serializeObjectApiClients⚡️Client⚡️GitHubEnterpriseClou $labels = $labelsSerializer0->serialize($labels, $this); after_labels: $result['labels'] = $labels; + $ephemeral = $object->ephemeral; + + if ($ephemeral === null) { + goto after_ephemeral; + } + + after_ephemeral: $result['ephemeral'] = $ephemeral; + return $result; } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php index 1ff5fc00119..f1c8d17ece3 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Hydrators.php @@ -72,6 +72,7 @@ final class Hydrators implements ObjectMapper private Internal\Hydrator\Operation\Enterprises\Enterprise\AuditLog\StreamKey|null $operation🌀Enterprises🌀Enterprise🌀AuditLog🌀StreamKey = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\AuditLog\Streams|null $operation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\AuditLog\Streams\StreamId|null $operation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams🌀StreamId = null; + private Internal\Hydrator\Operation\Enterprises\Enterprise\BypassRequests\PushRules|null $operation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeScanning\Alerts|null $operation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations = null; private Internal\Hydrator\Operation\Enterprises\Enterprise\CodeSecurity\Configurations\Defaults|null $operation🌀Enterprises🌀Enterprise🌀CodeSecurity🌀Configurations🌀Defaults = null; @@ -2210,6 +2211,15 @@ public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀AuditLo return $this->operation🌀Enterprises🌀Enterprise🌀AuditLog🌀Streams🌀StreamId; } + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules(): Internal\Hydrator\Operation\Enterprises\Enterprise\BypassRequests\PushRules + { + if ($this->operation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\BypassRequests\PushRules === false) { + $this->operation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules = new Internal\Hydrator\Operation\Enterprises\Enterprise\BypassRequests\PushRules(); + } + + return $this->operation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules; + } + public function getObjectMapperOperation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts(): Internal\Hydrator\Operation\Enterprises\Enterprise\CodeScanning\Alerts { if ($this->operation🌀Enterprises🌀Enterprise🌀CodeScanning🌀Alerts instanceof Internal\Hydrator\Operation\Enterprises\Enterprise\CodeScanning\Alerts === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterprise.php index e8599f9e29b..bc90de4ea0b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterprise.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterprise.php @@ -69,6 +69,14 @@ public function createResponse(ResponseInterface $response): Schema\Operations\A $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationErrorSimple::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); throw new ErrorSchemas\ValidationErrorSimple(422, $this->hydrator->hydrateObject(Schema\ValidationErrorSimple::class, $body)); + /** + * Conflict + **/ + + case 409: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); } break; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php index 08dfe71646f..ee79889e28b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForOrg.php @@ -69,6 +69,14 @@ public function createResponse(ResponseInterface $response): Schema\Operations\A $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationErrorSimple::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); throw new ErrorSchemas\ValidationErrorSimple(422, $this->hydrator->hydrateObject(Schema\ValidationErrorSimple::class, $body)); + /** + * Conflict + **/ + + case 409: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); } break; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php index 2901f2bc4f7..896bfe9427f 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/Actions/GenerateRunnerJitconfigForRepo.php @@ -72,6 +72,14 @@ public function createResponse(ResponseInterface $response): Schema\Operations\A $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\ValidationErrorSimple::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); throw new ErrorSchemas\ValidationErrorSimple(422, $this->hydrator->hydrateObject(Schema\ValidationErrorSimple::class, $body)); + /** + * Conflict + **/ + + case 409: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(409, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); } break; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequests.php new file mode 100644 index 00000000000..73b2a9d69cc --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequests.php @@ -0,0 +1,113 @@ +enterprise = $enterprise; + $this->organizationName = $organizationName; + $this->reviewer = $reviewer; + $this->requester = $requester; + $this->timePeriod = $timePeriod; + $this->requestStatus = $requestStatus; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{enterprise}', '{organization_name}', '{reviewer}', '{requester}', '{time_period}', '{request_status}', '{per_page}', '{page}'], [$this->enterprise, $this->organizationName, $this->reviewer, $this->requester, $this->timePeriod, $this->requestStatus, $this->perPage, $this->page], '/enterprises/{enterprise}/bypass-requests/push-rules' . '?organization_name={organization_name}&reviewer={reviewer}&requester={requester}&time_period={time_period}&request_status={request_status}&per_page={per_page}&page={page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\PushRuleBypassRequest { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\PushRuleBypassRequest::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListing.php new file mode 100644 index 00000000000..c57c384c308 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListing.php @@ -0,0 +1,113 @@ +enterprise = $enterprise; + $this->organizationName = $organizationName; + $this->reviewer = $reviewer; + $this->requester = $requester; + $this->timePeriod = $timePeriod; + $this->requestStatus = $requestStatus; + $this->perPage = $perPage; + $this->page = $page; + } + + public function createRequest(): RequestInterface + { + return new Request('GET', str_replace(['{enterprise}', '{organization_name}', '{reviewer}', '{requester}', '{time_period}', '{request_status}', '{per_page}', '{page}'], [$this->enterprise, $this->organizationName, $this->reviewer, $this->requester, $this->timePeriod, $this->requestStatus, $this->perPage, $this->page], '/enterprises/{enterprise}/bypass-requests/push-rules' . '?organization_name={organization_name}&reviewer={reviewer}&requester={requester}&time_period={time_period}&request_status={request_status}&per_page={per_page}&page={page}')); + } + + /** @return Observable */ + public function createResponse(ResponseInterface $response): Observable + { + $code = $response->getStatusCode(); + [$contentType] = explode(';', $response->getHeaderLine('Content-Type')); + switch ($contentType) { + case 'application/json': + $body = json_decode($response->getBody()->getContents(), true); + switch ($code) { + /** + * Response + **/ + case 200: + return Observable::fromArray($body, new ImmediateScheduler())->map(function (array $body): Schema\PushRuleBypassRequest { + $error = new RuntimeException(); + try { + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\PushRuleBypassRequest::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\PushRuleBypassRequest::class, $body); + } catch (Throwable $error) { + goto items_application_json_two_hundred_aaaaa; + } + + items_application_json_two_hundred_aaaaa: + throw $error; + }); + /** + * Resource not found + **/ + + case 404: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(404, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + /** + * Internal Error + **/ + + case 500: + $this->responseSchemaValidator->validate($body, Reader::readFromJson(Schema\BasicError::SCHEMA_JSON, \cebe\openapi\spec\Schema::class)); + + throw new ErrorSchemas\BasicError(500, $this->hydrator->hydrateObject(Schema\BasicError::class, $body)); + } + + break; + } + + throw new RuntimeException('Unable to find matching response code and content type'); + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForEnterprise.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForEnterprise.php index 8cedf4a0acd..1f29fb001d9 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForEnterprise.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForEnterprise.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $enterprise, array $params): Created { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Actions\GenerateRunnerJitconfigForEnterprise($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $enterprise); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php index a6f0b4ef94f..ee8df9274cf 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForOrg.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $org, array $params): Created { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Actions\GenerateRunnerJitconfigForOrg($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $org); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php index da9ddb30ca9..eeca0a04594 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Actions/GenerateRunnerJitconfigForRepo.php @@ -24,7 +24,6 @@ public function __construct(private Browser $browser, private AuthenticationInte { } - /** @return */ public function call(string $owner, string $repo, array $params): Created { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Actions\GenerateRunnerJitconfigForRepo($this->requestSchemaValidator, $this->responseSchemaValidator, $this->hydrator, $owner, $repo); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportGhe.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportGhe.php index ee4bd226d05..ff547c333cf 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportGhe.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportGhe.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $enterprise, int $year, int $month, int $day, int $hour, string $costCenterId): BillingUsageReport { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Billing\GetGithubBillingUsageReportGhe($this->responseSchemaValidator, $this->hydrator, $enterprise, $year, $month, $day, $hour, $costCenterId); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php index 29789432536..bc0eac6840b 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/Billing/GetGithubBillingUsageReportOrg.php @@ -24,6 +24,7 @@ public function __construct(private Browser $browser, private AuthenticationInte { } + /** @return */ public function call(string $org, int $year, int $month, int $day, int $hour): BillingUsageReport { $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\Billing\GetGithubBillingUsageReportOrg($this->responseSchemaValidator, $this->hydrator, $org, $year, $month, $day, $hour); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequests.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequests.php new file mode 100644 index 00000000000..73922d47cf1 --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequests.php @@ -0,0 +1,41 @@ + */ + public function call(string $enterprise, string $organizationName, string $reviewer, string $requester, string $timePeriod = 'day', string $requestStatus = 'all', int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\EnterpriseAdmin\ListPushBypassRequests($this->responseSchemaValidator, $this->hydrator, $enterprise, $organizationName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequestsListing.php b/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequestsListing.php new file mode 100644 index 00000000000..ce50160df2e --- /dev/null +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operator/EnterpriseAdmin/ListPushBypassRequestsListing.php @@ -0,0 +1,41 @@ + */ + public function call(string $enterprise, string $organizationName, string $reviewer, string $requester, string $timePeriod = 'day', string $requestStatus = 'all', int $perPage = 30, int $page = 1): iterable + { + $operation = new \ApiClients\Client\GitHubEnterpriseCloud\Internal\Operation\EnterpriseAdmin\ListPushBypassRequestsListing($this->responseSchemaValidator, $this->hydrator, $enterprise, $organizationName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + $request = $operation->createRequest(); + $result = await($this->browser->request($request->getMethod(), (string) $request->getUri(), $request->withHeader('Authorization', $this->authentication->authHeader())->getHeaders(), (string) $request->getBody())->then(static function (ResponseInterface $response) use ($operation): Observable { + return $operation->createResponse($response); + })); + if ($result instanceof Observable) { + $result = awaitObservable($result); + } + + return $result; + } +} diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Operators.php b/clients/GitHubEnterpriseCloud/src/Internal/Operators.php index 604abbd926f..3991f357c84 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Operators.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Operators.php @@ -107,6 +107,8 @@ final class Operators private Internal\Operator\EnterpriseAdmin\GetOneAuditLogStream|null $enterpriseAdmin👷GetOneAuditLogStream = null; private Internal\Operator\EnterpriseAdmin\UpdateAuditLogStream|null $enterpriseAdmin👷UpdateAuditLogStream = null; private Internal\Operator\EnterpriseAdmin\DeleteAuditLogStream|null $enterpriseAdmin👷DeleteAuditLogStream = null; + private Internal\Operator\EnterpriseAdmin\ListPushBypassRequests|null $enterpriseAdmin👷ListPushBypassRequests = null; + private Internal\Operator\EnterpriseAdmin\ListPushBypassRequestsListing|null $enterpriseAdmin👷ListPushBypassRequestsListing = null; private Internal\Operator\CodeScanning\ListAlertsForEnterprise|null $codeScanning👷ListAlertsForEnterprise = null; private Internal\Operator\CodeScanning\ListAlertsForEnterpriseListing|null $codeScanning👷ListAlertsForEnterpriseListing = null; private Internal\Operator\CodeSecurity\GetConfigurationsForEnterprise|null $codeSecurity👷GetConfigurationsForEnterprise = null; @@ -2232,6 +2234,24 @@ public function enterpriseAdmin👷DeleteAuditLogStream(): Internal\Operator\Ent return $this->enterpriseAdmin👷DeleteAuditLogStream; } + public function enterpriseAdmin👷ListPushBypassRequests(): Internal\Operator\EnterpriseAdmin\ListPushBypassRequests + { + if ($this->enterpriseAdmin👷ListPushBypassRequests instanceof Internal\Operator\EnterpriseAdmin\ListPushBypassRequests === false) { + $this->enterpriseAdmin👷ListPushBypassRequests = new Internal\Operator\EnterpriseAdmin\ListPushBypassRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules()); + } + + return $this->enterpriseAdmin👷ListPushBypassRequests; + } + + public function enterpriseAdmin👷ListPushBypassRequestsListing(): Internal\Operator\EnterpriseAdmin\ListPushBypassRequestsListing + { + if ($this->enterpriseAdmin👷ListPushBypassRequestsListing instanceof Internal\Operator\EnterpriseAdmin\ListPushBypassRequestsListing === false) { + $this->enterpriseAdmin👷ListPushBypassRequestsListing = new Internal\Operator\EnterpriseAdmin\ListPushBypassRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules()); + } + + return $this->enterpriseAdmin👷ListPushBypassRequestsListing; + } + public function codeScanning👷ListAlertsForEnterprise(): Internal\Operator\CodeScanning\ListAlertsForEnterprise { if ($this->codeScanning👷ListAlertsForEnterprise instanceof Internal\Operator\CodeScanning\ListAlertsForEnterprise === false) { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Billing.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Billing.php index 2dcb943c516..bcac1f0d6ed 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Billing.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Billing.php @@ -111,6 +111,7 @@ public function getSharedStorageBillingGhe(array $params): CombinedBillingUsage return $operator->call($arguments['enterprise']); } + /** @return */ public function getGithubBillingUsageReportGhe(array $params): BillingUsageReport { $arguments = []; @@ -155,6 +156,7 @@ public function getGithubBillingUsageReportGhe(array $params): BillingUsageRepor return $operator->call($arguments['enterprise'], $arguments['year'], $arguments['month'], $arguments['day'], $arguments['hour'], $arguments['cost_center_id']); } + /** @return */ public function getGithubBillingUsageReportOrg(array $params): BillingUsageReport { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/EnterpriseAdmin.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/EnterpriseAdmin.php index 6f244a975bd..495da1af215 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/EnterpriseAdmin.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/EnterpriseAdmin.php @@ -270,6 +270,63 @@ public function getAuditLogStreams(array $params): iterable return $operator->call($arguments['enterprise']); } + /** @return iterable */ + public function listPushBypassRequests(array $params): iterable + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + if (array_key_exists('organization_name', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: organization_name'); + } + + $arguments['organization_name'] = $params['organization_name']; + unset($params['organization_name']); + if (array_key_exists('reviewer', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: reviewer'); + } + + $arguments['reviewer'] = $params['reviewer']; + unset($params['reviewer']); + if (array_key_exists('requester', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: requester'); + } + + $arguments['requester'] = $params['requester']; + unset($params['requester']); + if (array_key_exists('time_period', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: time_period'); + } + + $arguments['time_period'] = $params['time_period']; + unset($params['time_period']); + if (array_key_exists('request_status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: request_status'); + } + + $arguments['request_status'] = $params['request_status']; + unset($params['request_status']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $operator = new Internal\Operator\EnterpriseAdmin\ListPushBypassRequests($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules()); + + return $operator->call($arguments['enterprise'], $arguments['organization_name'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page']); + } + /** @return Observable */ public function getEnterpriseCustomProperties(array $params): iterable { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php index f2be474006d..a3d52357f40 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Five.php @@ -59,7 +59,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|iterable|Observable|Observable|Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Schema\BasicError|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): HookDelivery|Ok|ActionsEnterprisePermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnerGroupsForEnterprise\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelfHostedRunnersForEnterprise\Response\ApplicationJson\Ok|AuditLogStreamKey|iterable|WithoutBody|NetworkConfiguration|NetworkSettings|RepositoryRuleset|GistComment|MarketplacePurchase|BasicError|ThreadSubscription|Json|ActionsOrganizationPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnerGroupsForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForOrg\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListOrgVariables\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Orgs\ListAttestations\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListOrgSecrets\Response\ApplicationJson\Ok|CopilotOrganizationDetails|OrganizationCustomRepositoryRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListOrgSecrets\Response\ApplicationJson\Ok|ExternalGroup|OrgHook|OrgMembership|Migration|OrganizationRole|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\PrivateRegistries\GetOrgPublicKey\Response\ApplicationJson\Ok|OrgPrivateRegistryConfiguration|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\HostedCompute\ListNetworkConfigurationsForOrg\Response\ApplicationJson\Ok\Application\Json|GroupMapping|TeamFull|ProjectCard|CheckAutomatedSecurityFixes|CodeSecurityConfigurationForRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetAllEnvironments\Response\ApplicationJson\Ok|Import|Installation|InteractionLimitResponse|One|Language|LicenseContent|Page|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\CheckPrivateVulnerabilityReporting\Response\ApplicationJson\Ok|ContentFile|SimpleUser|Stargazer|RepositorySubscription|Topic|TeamDiscussion|TeamMembership|TeamProject|CodespacesUserPublicKey|CodespacesSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\CodespaceMachinesForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Apps\ListInstallationReposForAuthenticatedUser\Response\ApplicationJson\Ok|Package|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Users\ListAttestations\Response\ApplicationJson\Ok|EmptyObject { if ($pathChunks[0] === '') { @@ -103,6 +103,12 @@ public function call(string $call, array $params, array $pathChunks): HookDelive return $this->routers->internal🔀Router🔀Get🔀EnterpriseAdmin()->getAuditLogStreams($params); } } + } elseif ($pathChunks[3] === 'bypass-requests') { + if ($pathChunks[4] === 'push-rules') { + if ($call === 'GET /enterprises/{enterprise}/bypass-requests/push-rules') { + return $this->routers->internal🔀Router🔀Get🔀EnterpriseAdmin()->listPushBypassRequests($params); + } + } } elseif ($pathChunks[3] === 'code-scanning') { if ($pathChunks[4] === 'alerts') { if ($call === 'GET /enterprises/{enterprise}/code-scanning/alerts') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php index 28d496d1a2d..af677ad9cb2 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Get/Six.php @@ -90,7 +90,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Observable|Schema\BillingUsageReport|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ + /** @return |Observable|Observable|Observable|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): ActionsCacheUsageOrgEnterprise|ActionsHostedRunnerLimits|Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetHostedRunnersPlatformsForEnterprise\Response\ApplicationJson\Ok|ActionsHostedRunner|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\EnterpriseAdmin\ListSelectedOrganizationsEnabledGithubActionsEnterprise\Response\ApplicationJson\Ok|SelectedActions|ActionsGetDefaultWorkflowPermissions|RunnerGroupsEnterprise|iterable|Runner|GetAuditLogStreamConfig|CodeSecurityConfiguration|WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeatsForEnterprise\Response\ApplicationJson\Ok|CustomProperty|ActionsBillingUsage|AdvancedSecurityActiveCommitters|GetAllCostCenters|PackagesBillingUsage|CombinedBillingUsage|BillingUsageReport|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetActionsCacheUsageByRepoForOrg\Response\ApplicationJson\Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\GetHostedRunnersPlatformsForOrg\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelectedRepositoriesEnabledGithubActionsOrganization\Response\ApplicationJson\Ok|RunnerGroupsOrg|ActionsPublicKey|OrganizationActionsSecret|OrganizationActionsVariable|CodespacesPublicKey|CodespacesOrgSecret|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\ListCopilotSeats\Response\ApplicationJson\Ok|DependabotPublicKey|OrganizationDependabotSecret|WebhookConfig|ApiInsightsSummaryStats|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\GetCodespacesForUserInOrg\Response\ApplicationJson\Ok\Application\Json|CopilotSeatDetails|Package|RuleSuite|NetworkConfiguration|NetworkSettings|ExternalGroups|ProjectCollaboratorPermission|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListArtifactsForRepo\Response\ApplicationJson\Ok|ActionsCacheList|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationSecrets\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoOrganizationVariables\Response\ApplicationJson\Ok|ActionsRepositoryPermissions|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListSelfHostedRunnersForRepo\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListWorkflowRunsForRepo\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoSecrets\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoVariables\Response\ApplicationJson\Ok\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Actions\ListRepoWorkflows\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\ListAttestations\Response\ApplicationJson\Ok\Application\Json|Autolink|BranchWithProtection|BasicError|CheckRun|CheckSuite|CodeScanningDefaultSetup|CodeownersErrors|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListDevcontainersInRepositoryForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\RepoMachinesForAuthenticatedUser\Response\ApplicationJson\Ok|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\PreFlightWithRepoForAuthenticatedUser\Response\ApplicationJson\Ok|CodespacesPermissionsCheckForDevcontainer|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepoSecrets\Response\ApplicationJson\Ok|CommitComment|Commit|CommunityProfile|CommitComparison|ContentDirectory|ContentFile|ContentSymlink|ContentSubmodule|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Dependabot\ListRepoSecrets\Response\ApplicationJson\Ok|DependencyGraphSpdxSbom|Deployment|Environment|Hook|Issue|DeployKey|Label|Milestone|PagesHealthCheck|EmptyObject|PullRequest|Release|RepositoryRuleset|SecretScanningScanHistory|RepositoryAdvisory|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCodeFrequencyStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetCommitActivityStats\Response\ApplicationJson\Accepted\Application\Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Repos\GetContributorsStats\Response\ApplicationJson\Accepted\Application\Json|ParticipationStats|CloneTraffic|ViewTraffic|ScimEnterpriseGroupList|ScimEnterpriseUserList|ScimUserList|TeamRepository|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Codespaces\ListRepositoriesForSecretForAuthenticatedUser\Response\ApplicationJson\Ok\Application\Json|CodespaceExportDetails { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/EnterpriseAdmin.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/EnterpriseAdmin.php index 3df6f659669..a1cbb016b03 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/EnterpriseAdmin.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/EnterpriseAdmin.php @@ -82,4 +82,67 @@ public function getAuditLogListing(array $params): iterable $arguments['page']++; } while (count($items) > 0); } + + /** @return iterable */ + public function listPushBypassRequestsListing(array $params): iterable + { + $arguments = []; + if (array_key_exists('enterprise', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: enterprise'); + } + + $arguments['enterprise'] = $params['enterprise']; + unset($params['enterprise']); + if (array_key_exists('organization_name', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: organization_name'); + } + + $arguments['organization_name'] = $params['organization_name']; + unset($params['organization_name']); + if (array_key_exists('reviewer', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: reviewer'); + } + + $arguments['reviewer'] = $params['reviewer']; + unset($params['reviewer']); + if (array_key_exists('requester', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: requester'); + } + + $arguments['requester'] = $params['requester']; + unset($params['requester']); + if (array_key_exists('time_period', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: time_period'); + } + + $arguments['time_period'] = $params['time_period']; + unset($params['time_period']); + if (array_key_exists('request_status', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: request_status'); + } + + $arguments['request_status'] = $params['request_status']; + unset($params['request_status']); + if (array_key_exists('per_page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: per_page'); + } + + $arguments['per_page'] = $params['per_page']; + unset($params['per_page']); + if (array_key_exists('page', $params) === false) { + throw new InvalidArgumentException('Missing mandatory field: page'); + } + + $arguments['page'] = $params['page']; + unset($params['page']); + $arguments['page'] = 1; + do { + $operator = new Internal\Operator\EnterpriseAdmin\ListPushBypassRequestsListing($this->browser, $this->authentication, $this->responseSchemaValidator, $this->hydrators->getObjectMapperOperation🌀Enterprises🌀Enterprise🌀BypassRequests🌀PushRules()); + $items = [...$operator->call($arguments['enterprise'], $arguments['organization_name'], $arguments['reviewer'], $arguments['requester'], $arguments['time_period'], $arguments['request_status'], $arguments['per_page'], $arguments['page'])]; + + yield from $items; + + $arguments['page']++; + } while (count($items) > 0); + } } diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php index adb31c6a4a9..2304c5b184a 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/List/Five.php @@ -16,13 +16,19 @@ public function __construct(private Routers $routers) { } - /** @return Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ + /** @return iterable|Observable|Observable|Observable|Observable|Observable|Schema\BasicError|WithoutBody|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable|Observable */ public function call(string $call, array $params, array $pathChunks): iterable|BasicError|WithoutBody { if ($pathChunks[0] === '') { if ($pathChunks[1] === 'enterprises') { if ($pathChunks[2] === '{enterprise}') { - if ($pathChunks[3] === 'code-scanning') { + if ($pathChunks[3] === 'bypass-requests') { + if ($pathChunks[4] === 'push-rules') { + if ($call === 'LIST /enterprises/{enterprise}/bypass-requests/push-rules') { + return $this->routers->internal🔀Router🔀List🔀EnterpriseAdmin()->listPushBypassRequestsListing($params); + } + } + } elseif ($pathChunks[3] === 'code-scanning') { if ($pathChunks[4] === 'alerts') { if ($call === 'LIST /enterprises/{enterprise}/code-scanning/alerts') { return $this->routers->internal🔀Router🔀List🔀CodeScanning()->listAlertsForEnterpriseListing($params); diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Actions.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Actions.php index 9140e600c60..25aec5bf9ce 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Actions.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Actions.php @@ -26,7 +26,6 @@ public function __construct(private SchemaValidator $requestSchemaValidator, pri { } - /** @return */ public function generateRunnerJitconfigForEnterprise(array $params): Created { $arguments = []; @@ -41,7 +40,6 @@ public function generateRunnerJitconfigForEnterprise(array $params): Created return $operator->call($arguments['enterprise'], $params); } - /** @return */ public function generateRunnerJitconfigForOrg(array $params): Created { $arguments = []; @@ -188,7 +186,6 @@ public function addCustomLabelsToSelfHostedRunnerForOrg(array $params): Ok return $operator->call($arguments['org'], $arguments['runner_id'], $params); } - /** @return */ public function generateRunnerJitconfigForRepo(array $params): Created { $arguments = []; diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php index eae1f0c24ff..78f740a2ec6 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Seven.php @@ -35,7 +35,7 @@ public function __construct(private Routers $routers) { } - /** @return |Observable|Schema\BasicError */ + /** @return |Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created|Observable|Schema\BasicError */ public function call(string $call, array $params, array $pathChunks): Ok|Json|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\CodeSecurity\AttachConfiguration\Response\ApplicationJson\Accepted\Application\Json|WithoutBody|Created|AuthenticationToken|BranchWithProtection|EmptyObject|CodeScanningVariantAnalysis|Reaction|CommitComment|DeploymentStatus|DeploymentBranchPolicy|DeploymentProtectionRule|Issue|IssueComment|iterable|BasicError|Codespace|PullRequestReviewComment|PullRequestSimple|PullRequestReview|ReleaseAsset|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\SecurityAdvisories\CreateRepositoryAdvisoryCveRequest\Response\ApplicationJson\Accepted\Application\Json|FullRepository { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Six.php b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Six.php index 88f53c6e4db..7cea1973a1d 100644 --- a/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Six.php +++ b/clients/GitHubEnterpriseCloud/src/Internal/Router/Post/Six.php @@ -37,6 +37,7 @@ public function __construct(private Routers $routers) { } + /** @return |Schema\Operations\Actions\GenerateRunnerJitconfigForEnterprise\Response\ApplicationJson\Created */ public function call(string $call, array $params, array $pathChunks): Json|Created|AuthenticationToken|WithoutBody|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForTeams\Response\ApplicationJson\Created|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Copilot\AddCopilotSeatsForUsers\Response\ApplicationJson\Created|TeamDiscussion|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\Projects\MoveCard\Response\ApplicationJson\Created\Application\Json|EmptyObject|CodeScanningSarifsReceipt|\ApiClients\Client\GitHubEnterpriseCloud\Schema\Operations\DependencyGraph\CreateRepositorySnapshot\Response\ApplicationJson\Created|ShortBlob|GitCommit|GitRef|GitTag|GitTree|PageBuildStatus|PageDeployment|ReleaseNotesContent|SecretScanningPushProtectionBypass|RepositoryAdvisory|Status|TagProtection|GroupResponse|UserResponse|ScimUser|TeamDiscussionComment|Reaction { if ($pathChunks[0] === '') { diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Actions.php b/clients/GitHubEnterpriseCloud/src/Operation/Actions.php index 05a027d898a..331b04e8ae4 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Actions.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Actions.php @@ -127,7 +127,6 @@ public function setGithubActionsDefaultWorkflowPermissionsEnterprise(string $ent return $this->operators->actions👷SetGithubActionsDefaultWorkflowPermissionsEnterprise()->call($enterprise, $params); } - /** @return */ public function generateRunnerJitconfigForEnterprise(string $enterprise, array $params): Created { return $this->operators->actions👷GenerateRunnerJitconfigForEnterprise()->call($enterprise, $params); @@ -361,7 +360,6 @@ public function listRunnerApplicationsForOrg(string $org): iterable return $this->operators->actions👷ListRunnerApplicationsForOrg()->call($org); } - /** @return */ public function generateRunnerJitconfigForOrg(string $org, array $params): Created { return $this->operators->actions👷GenerateRunnerJitconfigForOrg()->call($org, $params); @@ -691,7 +689,6 @@ public function listRunnerApplicationsForRepo(string $owner, string $repo): iter return $this->operators->actions👷ListRunnerApplicationsForRepo()->call($owner, $repo); } - /** @return */ public function generateRunnerJitconfigForRepo(string $owner, string $repo, array $params): Created { return $this->operators->actions👷GenerateRunnerJitconfigForRepo()->call($owner, $repo, $params); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/Billing.php b/clients/GitHubEnterpriseCloud/src/Operation/Billing.php index 1545dc33dc3..f468d0989ca 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/Billing.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/Billing.php @@ -62,11 +62,13 @@ public function getSharedStorageBillingGhe(string $enterprise): CombinedBillingU return $this->operators->billing👷GetSharedStorageBillingGhe()->call($enterprise); } + /** @return */ public function getGithubBillingUsageReportGhe(string $enterprise, int $year, int $month, int $day, int $hour, string $costCenterId): BillingUsageReport { return $this->operators->billing👷GetGithubBillingUsageReportGhe()->call($enterprise, $year, $month, $day, $hour, $costCenterId); } + /** @return */ public function getGithubBillingUsageReportOrg(string $org, int $year, int $month, int $day, int $hour): BillingUsageReport { return $this->operators->billing👷GetGithubBillingUsageReportOrg()->call($org, $year, $month, $day, $hour); diff --git a/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php b/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php index 976ce8671d3..0340ef0e4c0 100644 --- a/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php +++ b/clients/GitHubEnterpriseCloud/src/Operation/EnterpriseAdmin.php @@ -274,6 +274,18 @@ public function deleteAuditLogStream(string $enterprise, int $streamId): Without return $this->operators->enterpriseAdmin👷DeleteAuditLogStream()->call($enterprise, $streamId); } + /** @return iterable */ + public function listPushBypassRequests(string $enterprise, string $organizationName, string $reviewer, string $requester, string $timePeriod, string $requestStatus, int $perPage, int $page): iterable + { + return $this->operators->enterpriseAdmin👷ListPushBypassRequests()->call($enterprise, $organizationName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + } + + /** @return iterable */ + public function listPushBypassRequestsListing(string $enterprise, string $organizationName, string $reviewer, string $requester, string $timePeriod, string $requestStatus, int $perPage, int $page): iterable + { + return $this->operators->enterpriseAdmin👷ListPushBypassRequestsListing()->call($enterprise, $organizationName, $reviewer, $requester, $timePeriod, $requestStatus, $perPage, $page); + } + /** @return */ public function getConsumedLicenses(string $enterprise, int $perPage, int $page): string { diff --git a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php index acbc3694d67..5c6e2617699 100644 --- a/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/src/PHPStan/ClientCallReturnTypes.php @@ -344,7 +344,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /enterprises/{enterprise}/actions/runners/generate-jitconfig') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForEnterprise\\Response\\ApplicationJson\\Created'); } if ($call === 'POST /enterprises/{enterprise}/actions/runners/registration-token') { @@ -427,6 +427,14 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method return $this->typeResolver->resolve(''); } + if ($call === 'GET /enterprises/{enterprise}/bypass-requests/push-rules') { + return $this->typeResolver->resolve('iterable'); + } + + if ($call === 'LIST /enterprises/{enterprise}/bypass-requests/push-rules') { + return $this->typeResolver->resolve('iterable'); + } + if ($call === 'GET /enterprises/{enterprise}/code-scanning/alerts') { return $this->typeResolver->resolve('Observable'); } @@ -604,7 +612,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /enterprises/{enterprise}/settings/billing/usage') { - return $this->typeResolver->resolve('Schema\\BillingUsageReport'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics') { @@ -884,7 +892,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'GET /organizations/{org}/settings/billing/usage') { - return $this->typeResolver->resolve('Schema\\BillingUsageReport'); + return $this->typeResolver->resolve(''); } if ($call === 'GET /orgs/{org}') { @@ -1060,7 +1068,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /orgs/{org}/actions/runners/generate-jitconfig') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForEnterprise\\Response\\ApplicationJson\\Created'); } if ($call === 'POST /orgs/{org}/actions/runners/registration-token') { @@ -2520,7 +2528,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method } if ($call === 'POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig') { - return $this->typeResolver->resolve(''); + return $this->typeResolver->resolve('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForEnterprise\\Response\\ApplicationJson\\Created'); } if ($call === 'POST /repos/{owner}/{repo}/actions/runners/registration-token') { diff --git a/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php b/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php similarity index 94% rename from clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php rename to clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php index b60a2aa3f76..878c80d422d 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet2329E85F/Tiet2404E7BA/TietF6C81F1C/Tiet1EE267CF.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietEAB1E353/TietA691FF98/TietCADB7922/TietA4382CA1.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace ApiClients\Client\GitHubEnterpriseCloud\Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C; +namespace ApiClients\Client\GitHubEnterpriseCloud\Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922; use EventSauce\ObjectHydrator\MapFrom; -abstract readonly class Tiet1EE267CF +abstract readonly class TietA4382CA1 { public const SCHEMA_JSON = '{ "required": [ @@ -98,6 +98,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -128,7 +131,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, { "id": 5, @@ -148,7 +152,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false } ] }'; diff --git a/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet64C370DE/Tiet030B21C9/Tiet0FE13F38/Tiet1E6A295D.php b/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietED690D6D/Tiet788B85F7/Tiet90BDCBBD/Tiet6547B867.php similarity index 94% rename from clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet64C370DE/Tiet030B21C9/Tiet0FE13F38/Tiet1E6A295D.php rename to clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietED690D6D/Tiet788B85F7/Tiet90BDCBBD/Tiet6547B867.php index b5ff0db05d0..6702e543a7f 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/Tiet64C370DE/Tiet030B21C9/Tiet0FE13F38/Tiet1E6A295D.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/AliasAbstract/TietED690D6D/Tiet788B85F7/Tiet90BDCBBD/Tiet6547B867.php @@ -2,11 +2,11 @@ declare(strict_types=1); -namespace ApiClients\Client\GitHubEnterpriseCloud\Schema\AliasAbstract\Tiet64C370DE\Tiet030B21C9\Tiet0FE13F38; +namespace ApiClients\Client\GitHubEnterpriseCloud\Schema\AliasAbstract\TietED690D6D\Tiet788B85F7\Tiet90BDCBBD; use EventSauce\ObjectHydrator\MapFrom; -abstract readonly class Tiet1E6A295D +abstract readonly class Tiet6547B867 { public const SCHEMA_JSON = '{ "required": [ @@ -98,6 +98,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -128,7 +131,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, { "id": 5, @@ -148,7 +152,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false } ] }'; diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/GenerateRunnerJitconfigForEnterprise/Response/ApplicationJson/Created.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/GenerateRunnerJitconfigForEnterprise/Response/ApplicationJson/Created.php index c2f841b61e3..cf55a857947 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/GenerateRunnerJitconfigForEnterprise/Response/ApplicationJson/Created.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/GenerateRunnerJitconfigForEnterprise/Response/ApplicationJson/Created.php @@ -94,6 +94,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -125,7 +128,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, "encoded_jit_config": "generated" }'; diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php index 55def159502..862cff00bf0 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForOrg/Response/ApplicationJson/Ok.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class Ok extends Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C\Tiet1EE267CF +final readonly class Ok extends Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922\TietA4382CA1 { } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php index 9a0281eaca7..afcc79f2f26 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class Ok extends Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C\Tiet1EE267CF +final readonly class Ok extends Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922\TietA4382CA1 { } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php index 40d0e1bd428..fbe8d7858d7 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersForRepo/Response/ApplicationJson/Ok/Application/Json.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class Json extends Schema\AliasAbstract\Tiet2329E85F\Tiet2404E7BA\TietF6C81F1C\Tiet1EE267CF +final readonly class Json extends Schema\AliasAbstract\TietEAB1E353\TietA691FF98\TietCADB7922\TietA4382CA1 { } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php index ec1bc1d5203..126419f9f28 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class Ok extends Schema\AliasAbstract\Tiet64C370DE\Tiet030B21C9\Tiet0FE13F38\Tiet1E6A295D +final readonly class Ok extends Schema\AliasAbstract\TietED690D6D\Tiet788B85F7\Tiet90BDCBBD\Tiet6547B867 { } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok/Application/Json.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok/Application/Json.php index a0d4fe9f257..030afc05f69 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok/Application/Json.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/Actions/ListSelfHostedRunnersInGroupForOrg/Response/ApplicationJson/Ok/Application/Json.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class Json extends Schema\AliasAbstract\Tiet64C370DE\Tiet030B21C9\Tiet0FE13F38\Tiet1E6A295D +final readonly class Json extends Schema\AliasAbstract\TietED690D6D\Tiet788B85F7\Tiet90BDCBBD\Tiet6547B867 { } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersForEnterprise/Response/ApplicationJson/Ok.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersForEnterprise/Response/ApplicationJson/Ok.php index eea4b90e8d5..7dba295f4b4 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersForEnterprise/Response/ApplicationJson/Ok.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersForEnterprise/Response/ApplicationJson/Ok.php @@ -94,6 +94,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -124,7 +127,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }, { "id": 5, @@ -144,7 +148,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false } ] }'; diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersInGroupForEnterprise/Response/ApplicationJson/Ok.php b/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersInGroupForEnterprise/Response/ApplicationJson/Ok.php index 40ffec09f64..4849d2b0355 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersInGroupForEnterprise/Response/ApplicationJson/Ok.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Operations/EnterpriseAdmin/ListSelfHostedRunnersInGroupForEnterprise/Response/ApplicationJson/Ok.php @@ -6,6 +6,6 @@ use ApiClients\Client\GitHubEnterpriseCloud\Schema; -final readonly class Ok extends Schema\AliasAbstract\Tiet64C370DE\Tiet030B21C9\Tiet0FE13F38\Tiet1E6A295D +final readonly class Ok extends Schema\AliasAbstract\TietED690D6D\Tiet788B85F7\Tiet90BDCBBD\Tiet6547B867 { } diff --git a/clients/GitHubEnterpriseCloud/src/Schema/Runner.php b/clients/GitHubEnterpriseCloud/src/Schema/Runner.php index 7b46d0a7227..6a3bfead57a 100644 --- a/clients/GitHubEnterpriseCloud/src/Schema/Runner.php +++ b/clients/GitHubEnterpriseCloud/src/Schema/Runner.php @@ -86,6 +86,9 @@ }, "description": "A label for a self hosted runner" } + }, + "ephemeral": { + "type": "boolean" } }, "description": "A self hosted runner" @@ -110,7 +113,8 @@ "name": "generated", "type": "custom" } - ] + ], + "ephemeral": false }'; /** @@ -121,7 +125,7 @@ * status: The status of the runner. */ public function __construct(public int $id, #[MapFrom('runner_group_id')] - public int|null $runnerGroupId, public string $name, public string $os, public string $status, public bool $busy, public array $labels,) + public int|null $runnerGroupId, public string $name, public string $os, public string $status, public bool $busy, public array $labels, public bool|null $ephemeral,) { } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterpriseTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterpriseTest.php index d76ff407feb..97184a70406 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterpriseTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForEnterpriseTest.php @@ -120,4 +120,38 @@ public function operations_httpCode_422_requestContentType_application_json_resp $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->actions()->generateRunnerJitconfigForEnterprise('generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/enterprises/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GenerateRunnerJitconfigForEnterprise::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + + return $data; + })(json_decode(Schema\Actions\GenerateRunnerJitconfigForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/enterprises/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->generateRunnerJitconfigForEnterprise('generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForEnterprise\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php index c6219b29108..f7cb7e8bb03 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForOrgTest.php @@ -120,4 +120,38 @@ public function operations_httpCode_422_requestContentType_application_json_resp $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->actions()->generateRunnerJitconfigForOrg('generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GenerateRunnerJitconfigForOrg::OPERATION_MATCH, (static function (array $data): array { + $data['org'] = 'generated'; + + return $data; + })(json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/orgs/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->generateRunnerJitconfigForOrg('generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForOrg\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php index 3448b01536c..9cfa8a12926 100644 --- a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/Actions/GenerateRunnerJitconfigForRepoTest.php @@ -123,4 +123,39 @@ public function operations_httpCode_422_requestContentType_application_json_resp $client = new Client($auth->reveal(), $browser->reveal()); $result = $client->operations()->actions()->generateRunnerJitconfigForRepo('generated', 'generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); } + + /** @test */ + public function call_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/repos/generated/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\Actions\GenerateRunnerJitconfigForRepo::OPERATION_MATCH, (static function (array $data): array { + $data['owner'] = 'generated'; + $data['repo'] = 'generated'; + + return $data; + })(json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true))); + } + + /** @test */ + public function operations_httpCode_409_requestContentType_application_json_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(409, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('POST', '/repos/generated/generated/actions/runners/generate-jitconfig', Argument::type('array'), json_encode(json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)))->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->actions()->generateRunnerJitconfigForRepo('generated', 'generated', json_decode(Schema\Actions\GenerateRunnerJitconfigForRepo\Request\ApplicationJson::SCHEMA_EXAMPLE_DATA, true)); + } } diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListingTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListingTest.php new file mode 100644 index 00000000000..a3d26442f4f --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsListingTest.php @@ -0,0 +1,113 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\EnterpriseAdmin\ListPushBypassRequestsListing::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['organization_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->enterpriseAdmin()->listPushBypassRequestsListing('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + foreach ($result as $item) { + } + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\EnterpriseAdmin\ListPushBypassRequestsListing::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['organization_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + foreach ($result as $item) { + } + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->enterpriseAdmin()->listPushBypassRequestsListing('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + foreach ($result as $item) { + } + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsTest.php b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsTest.php new file mode 100644 index 00000000000..b2add61788d --- /dev/null +++ b/clients/GitHubEnterpriseCloud/tests/Internal/Operation/EnterpriseAdmin/ListPushBypassRequestsTest.php @@ -0,0 +1,105 @@ + 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\EnterpriseAdmin\ListPushBypassRequests::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['organization_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_404_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(404, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->enterpriseAdmin()->listPushBypassRequests('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + } + + /** @test */ + public function call_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->call(Internal\Operation\EnterpriseAdmin\ListPushBypassRequests::OPERATION_MATCH, (static function (array $data): array { + $data['enterprise'] = 'generated'; + $data['organization_name'] = 'generated'; + $data['reviewer'] = 'generated'; + $data['requester'] = 'generated'; + $data['time_period'] = 'generated'; + $data['request_status'] = 'generated'; + $data['per_page'] = 8; + $data['page'] = 1; + + return $data; + })([])); + } + + /** @test */ + public function operations_httpCode_500_responseContentType_application_json_zero(): void + { + self::expectException(ErrorSchemas\BasicError::class); + $response = new Response(500, ['Content-Type' => 'application/json'], json_encode(json_decode(Schema\BasicError::SCHEMA_EXAMPLE_DATA, true))); + $auth = $this->prophesize(AuthenticationInterface::class); + $auth->authHeader(Argument::any())->willReturn('Bearer beer')->shouldBeCalled(); + $browser = $this->prophesize(Browser::class); + $browser->withBase(Argument::any())->willReturn($browser->reveal()); + $browser->withFollowRedirects(Argument::any())->willReturn($browser->reveal()); + $browser->request('GET', '/enterprises/generated/bypass-requests/push-rules?organization_name=generated&reviewer=generated&requester=generated&time_period=generated&request_status=generated&per_page=8&page=1', Argument::type('array'), Argument::any())->willReturn(resolve($response))->shouldBeCalled(); + $client = new Client($auth->reveal(), $browser->reveal()); + $result = $client->operations()->enterpriseAdmin()->listPushBypassRequests('generated', 'generated', 'generated', 'generated', 'generated', 'generated', 8, 1); + } +} diff --git a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php index a7080227fbd..721131903e5 100644 --- a/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php +++ b/clients/GitHubEnterpriseCloud/tests/Types/ClientCallReturnTypes.php @@ -92,7 +92,7 @@ function authHeader(): string assertType('', $client->call('DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}')); assertType('', $client->call('GET /enterprises/{enterprise}/actions/runners')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/actions/runners/downloads')); -assertType('', $client->call('POST /enterprises/{enterprise}/actions/runners/generate-jitconfig')); +assertType('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForEnterprise\\Response\\ApplicationJson\\Created', $client->call('POST /enterprises/{enterprise}/actions/runners/generate-jitconfig')); assertType('', $client->call('POST /enterprises/{enterprise}/actions/runners/registration-token')); assertType('', $client->call('POST /enterprises/{enterprise}/actions/runners/remove-token')); assertType('', $client->call('GET /enterprises/{enterprise}/actions/runners/{runner_id}')); @@ -113,6 +113,8 @@ function authHeader(): string assertType('', $client->call('GET /enterprises/{enterprise}/audit-log/streams/{stream_id}')); assertType('', $client->call('PUT /enterprises/{enterprise}/audit-log/streams/{stream_id}')); assertType('', $client->call('DELETE /enterprises/{enterprise}/audit-log/streams/{stream_id}')); +assertType('iterable', $client->call('GET /enterprises/{enterprise}/bypass-requests/push-rules')); +assertType('iterable', $client->call('LIST /enterprises/{enterprise}/bypass-requests/push-rules')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/code-scanning/alerts')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/code-scanning/alerts')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/code-security/configurations')); @@ -157,7 +159,7 @@ function authHeader(): string assertType('', $client->call('DELETE /enterprises/{enterprise}/settings/billing/cost-centers/{cost_center_id}/resource')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/packages')); assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/shared-storage')); -assertType('Schema\\BillingUsageReport', $client->call('GET /enterprises/{enterprise}/settings/billing/usage')); +assertType('', $client->call('GET /enterprises/{enterprise}/settings/billing/usage')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics')); assertType('Observable', $client->call('LIST /enterprises/{enterprise}/team/{team_slug}/copilot/metrics')); assertType('Observable', $client->call('GET /enterprises/{enterprise}/team/{team_slug}/copilot/usage')); @@ -227,7 +229,7 @@ function authHeader(): string assertType('', $client->call('GET /octocat')); assertType('Observable|WithoutBody', $client->call('GET /organizations')); assertType('', $client->call('GET /organizations/{organization_id}/custom_roles')); -assertType('Schema\\BillingUsageReport', $client->call('GET /organizations/{org}/settings/billing/usage')); +assertType('', $client->call('GET /organizations/{org}/settings/billing/usage')); assertType('', $client->call('GET /orgs/{org}')); assertType('', $client->call('DELETE /orgs/{org}')); assertType('', $client->call('PATCH /orgs/{org}')); @@ -271,7 +273,7 @@ function authHeader(): string assertType('', $client->call('DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}')); assertType('', $client->call('GET /orgs/{org}/actions/runners')); assertType('Observable', $client->call('GET /orgs/{org}/actions/runners/downloads')); -assertType('', $client->call('POST /orgs/{org}/actions/runners/generate-jitconfig')); +assertType('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForEnterprise\\Response\\ApplicationJson\\Created', $client->call('POST /orgs/{org}/actions/runners/generate-jitconfig')); assertType('', $client->call('POST /orgs/{org}/actions/runners/registration-token')); assertType('', $client->call('POST /orgs/{org}/actions/runners/remove-token')); assertType('', $client->call('GET /orgs/{org}/actions/runners/{runner_id}')); @@ -636,7 +638,7 @@ function authHeader(): string assertType('', $client->call('PUT /repos/{owner}/{repo}/actions/permissions/workflow')); assertType('', $client->call('GET /repos/{owner}/{repo}/actions/runners')); assertType('Observable', $client->call('GET /repos/{owner}/{repo}/actions/runners/downloads')); -assertType('', $client->call('POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig')); +assertType('Schema\\Operations\\Actions\\GenerateRunnerJitconfigForEnterprise\\Response\\ApplicationJson\\Created', $client->call('POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig')); assertType('', $client->call('POST /repos/{owner}/{repo}/actions/runners/registration-token')); assertType('', $client->call('POST /repos/{owner}/{repo}/actions/runners/remove-token')); assertType('', $client->call('GET /repos/{owner}/{repo}/actions/runners/{runner_id}')); diff --git a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml index 683da478a30..a95a39c05a6 100644 --- a/etc/specs/GitHubEnterpriseCloud/current.spec.yaml +++ b/etc/specs/GitHubEnterpriseCloud/current.spec.yaml @@ -3028,6 +3028,8 @@ paths: "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed_simple" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: true enabledForGitHubApps: false @@ -3739,6 +3741,47 @@ paths: enabledForGitHubApps: true category: enterprise-admin subcategory: audit-log + "/enterprises/{enterprise}/bypass-requests/push-rules": + get: + summary: List push rule bypass requests within an enterprise + description: Lists the requests made by users of a repository to bypass push + protection rules within an enterprise. + tags: + - enterprise-admin + operationId: enterprise-admin/list-push-bypass-requests + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest//rest/enterprise-admin/bypass-requests#list-push-rule-bypass-requests-within-an-enterprise + x-github: + githubCloudOnly: true + enabledForGitHubApps: false + category: enterprise-admin + subcategory: bypass-requests + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/org-name-in-query" + - "$ref": "#/components/parameters/bypass-reviewer-name" + - "$ref": "#/components/parameters/bypass-requester-name" + - "$ref": "#/components/parameters/time-period" + - "$ref": "#/components/parameters/bypass-request-status" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/push-rule-bypass-request" + examples: + default: + "$ref": "#/components/examples/push-rule-bypass-request-items" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" "/enterprises/{enterprise}/code-scanning/alerts": get: summary: List code scanning alerts for an enterprise @@ -10462,6 +10505,8 @@ paths: "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed_simple" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -25625,6 +25670,8 @@ paths: "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed_simple" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -42606,7 +42653,6 @@ paths: environment: github-pages pages_build_version: 4fd754f7e594640989b406850d0bc8f06a121251 oidc_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlV2R1h4SUhlY0JFc1JCdEttemUxUEhfUERiVSIsImtpZCI6IjUyRjE5N0M0ODFERTcwMTEyQzQ0MUI0QTlCMzdCNTNDN0ZDRjBEQjUifQ.eyJqdGkiOiJhMWIwNGNjNy0zNzZiLTQ1N2QtOTMzNS05NTY5YmVjZDExYTIiLCJzdWIiOiJyZXBvOnBhcGVyLXNwYS9taW55aTplbnZpcm9ubWVudDpQcm9kdWN0aW9uIiwiYXVkIjoiaHR0cHM6Ly9naXRodWIuY29tL3BhcGVyLXNwYSIsInJlZiI6InJlZnMvaGVhZHMvbWFpbiIsInNoYSI6ImEyODU1MWJmODdiZDk3NTFiMzdiMmM0YjM3M2MxZjU3NjFmYWM2MjYiLCJyZXBvc2l0b3J5IjoicGFwZXItc3BhL21pbnlpIiwicmVwb3NpdG9yeV9vd25lciI6InBhcGVyLXNwYSIsInJ1bl9pZCI6IjE1NDY0NTkzNjQiLCJydW5fbnVtYmVyIjoiMzQiLCJydW5fYXR0ZW1wdCI6IjYiLCJhY3RvciI6IllpTXlzdHkiLCJ3b3JrZmxvdyI6IkNJIiwiaGVhZF9yZWYiOiIiLCJiYXNlX3JlZiI6IiIsImV2ZW50X25hbWUiOiJwdXNoIiwicmVmX3R5cGUiOiJicmFuY2giLCJlbnZpcm9ubWVudCI6IlByb2R1Y3Rpb24iLCJqb2Jfd29ya2Zsb3dfcmVmIjoicGFwZXItc3BhL21pbnlpLy5naXRodWIvd29ya2Zsb3dzL2JsYW5rLnltbEByZWZzL2hlYWRzL21haW4iLCJpc3MiOiJodHRwczovL3Rva2VuLmFjdGlvbnMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwibmJmIjoxNjM5MDAwODU2LCJleHAiOjE2MzkwMDE3NTYsImlhdCI6MTYzOTAwMTQ1Nn0.VP8WictbQECKozE2SgvKb2FqJ9hisWsoMkYRTqfBrQfZTCXi5IcFEdgDMB2X7a99C2DeUuTvHh9RMKXLL2a0zg3-Sd7YrO7a2ll2kNlnvyIypcN6AeIc7BxHsTTnZN9Ud_xmEsTrSRGOEKmzCFkULQ6N4zlVD0sidypmXlMemmWEcv_ZHqhioEI_VMp5vwXQurketWH7qX4oDgG4okyYtPrv5RQHbfQcVo9izaPJ_jnsDd0CBA0QOx9InjPidtIkMYQLyUgJy33HLJy86EFNUnAf8UhBQuQi5mAsEpEzBBuKpG3PDiPtYCHOk64JZkZGd5mR888a5sbHRiaF8hm8YA - preview: false responses: '200': description: Response @@ -78992,6 +79038,8 @@ components: type: array items: "$ref": "#/components/schemas/runner-label" + ephemeral: + type: boolean required: - id - name @@ -79479,6 +79527,156 @@ components: - enabled - created_at - updated_at + bypass-response: + title: Bypass response + description: A response made by a delegated bypasser to a bypass request. + type: object + properties: + id: + type: integer + description: The ID of the response to the bypass request. + reviewer: + type: object + description: The user who reviewed the bypass request. + properties: + actor_id: + type: integer + description: The ID of the GitHub user who reviewed the bypass request. + actor_name: + type: string + description: The name of the GitHub user who reviewed the bypass request. + status: + type: string + description: The response status to the bypass request until dismissed. + enum: + - approved + - denied + - dismissed + created_at: + type: string + format: date-time + description: The date and time the response to the bypass request was created. + push-rule-bypass-request: + title: Push rule bypass request + description: A bypass request made by a user asking to be exempted from a push + rule in this repository. + type: object + properties: + id: + type: integer + description: The unique identifier of the bypass request. + number: + type: integer + description: The number uniquely identifying the bypass request within its + repository. + repository: + type: object + description: The repository the bypass request is for. + properties: + id: + type: integer + description: The ID of the repository the bypass request is for. + name: + type: string + description: The name of the repository the bypass request is for. + full_name: + type: string + description: The full name of the repository the bypass request is for. + organization: + type: object + description: The organization associated with the repository the bypass + request is for. + properties: + id: + type: integer + description: The ID of the organization. + name: + type: string + description: The name of the organization. + requester: + type: object + description: The user who requested the bypass. + properties: + actor_id: + type: integer + description: The ID of the GitHub user who requested the bypass. + actor_name: + type: string + description: The name of the GitHub user who requested the bypass. + request_type: + type: string + description: The type of request. + data: + type: + - array + - 'null' + description: Data describing the push rules that are being requested to + be bypassed. + items: + type: object + properties: + ruleset_id: + type: integer + description: The ID of the ruleset for the rules that were violated. + ruleset_name: + type: string + description: The name of the ruleset for the rules that were violated. + total_violations: + type: integer + description: The number of rule violations generated from the push + associated with this request. + rule_type: + type: string + description: The type of rule that was violated. + resource_identifier: + type: string + description: The unique identifier for the request type of the bypass request. + For example, a commit SHA. + examples: + - 827efc6d56897b048c772eb4087f854f46256132 + status: + type: string + description: The status of the bypass request. + enum: + - pending + - denied + - approved + - cancelled + - completed + - expired + - open + requester_comment: + type: + - string + - 'null' + description: The comment the requester provided when creating the bypass + request. + expires_at: + type: string + format: date-time + description: The date and time the bypass request will expire. + created_at: + type: string + format: date-time + description: The date and time the bypass request was created. + responses: + type: + - array + - 'null' + description: The responses to the bypass request. + items: + "$ref": "#/components/schemas/bypass-response" + url: + type: string + format: uri + examples: + - https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/1 + html_url: + type: string + description: The URL to view the bypass request in a browser. + format: uri + examples: + - https://github.com/octo-org/smile/exemptions/1 code-scanning-analysis-tool-name: type: string description: The name of the tool used to generate the code scanning analysis. @@ -85938,156 +86136,6 @@ components: - created_at - updated_at - visibility - bypass-response: - title: Bypass response - description: A response made by a delegated bypasser to a bypass request. - type: object - properties: - id: - type: integer - description: The ID of the response to the bypass request. - reviewer: - type: object - description: The user who reviewed the bypass request. - properties: - actor_id: - type: integer - description: The ID of the GitHub user who reviewed the bypass request. - actor_name: - type: string - description: The name of the GitHub user who reviewed the bypass request. - status: - type: string - description: The response status to the bypass request until dismissed. - enum: - - approved - - denied - - dismissed - created_at: - type: string - format: date-time - description: The date and time the response to the bypass request was created. - push-rule-bypass-request: - title: Push rule bypass request - description: A bypass request made by a user asking to be exempted from a push - rule in this repository. - type: object - properties: - id: - type: integer - description: The unique identifier of the bypass request. - number: - type: integer - description: The number uniquely identifying the bypass request within its - repository. - repository: - type: object - description: The repository the bypass request is for. - properties: - id: - type: integer - description: The ID of the repository the bypass request is for. - name: - type: string - description: The name of the repository the bypass request is for. - full_name: - type: string - description: The full name of the repository the bypass request is for. - organization: - type: object - description: The organization associated with the repository the bypass - request is for. - properties: - id: - type: integer - description: The ID of the organization. - name: - type: string - description: The name of the organization. - requester: - type: object - description: The user who requested the bypass. - properties: - actor_id: - type: integer - description: The ID of the GitHub user who requested the bypass. - actor_name: - type: string - description: The name of the GitHub user who requested the bypass. - request_type: - type: string - description: The type of request. - data: - type: - - array - - 'null' - description: Data describing the push rules that are being requested to - be bypassed. - items: - type: object - properties: - ruleset_id: - type: integer - description: The ID of the ruleset for the rules that were violated. - ruleset_name: - type: string - description: The name of the ruleset for the rules that were violated. - total_violations: - type: integer - description: The number of rule violations generated from the push - associated with this request. - rule_type: - type: string - description: The type of rule that was violated. - resource_identifier: - type: string - description: The unique identifier for the request type of the bypass request. - For example, a commit SHA. - examples: - - 827efc6d56897b048c772eb4087f854f46256132 - status: - type: string - description: The status of the bypass request. - enum: - - pending - - denied - - approved - - cancelled - - completed - - expired - - open - requester_comment: - type: - - string - - 'null' - description: The comment the requester provided when creating the bypass - request. - expires_at: - type: string - format: date-time - description: The date and time the bypass request will expire. - created_at: - type: string - format: date-time - description: The date and time the bypass request was created. - responses: - type: - - array - - 'null' - description: The responses to the bypass request. - items: - "$ref": "#/components/schemas/bypass-response" - url: - type: string - format: uri - examples: - - https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/1 - html_url: - type: string - description: The URL to view the bypass request in a browser. - format: uri - examples: - - https://github.com/octo-org/smile/exemptions/1 code-scanning-alert-severity: type: string description: Severity of a code scanning alert. @@ -215215,6 +215263,7 @@ components: os: linux status: online busy: true + ephemeral: false labels: - id: 5 name: self-hosted @@ -215230,6 +215279,7 @@ components: os: macos status: offline busy: false + ephemeral: false labels: - id: 5 name: self-hosted @@ -215302,6 +215352,7 @@ components: os: macos status: online busy: true + ephemeral: false labels: - id: 5 name: self-hosted @@ -215405,6 +215456,74 @@ components: created_at: '2024-06-06T08:00:00Z' updated_at: '2024-06-06T08:00:00Z' paused_at: + push-rule-bypass-request-items: + value: + - id: 21 + number: 42 + repository: + id: 1 + name: smile + full_name: octo-org/smile + organization: + id: 1 + name: octo-org + requester: + actor_id: 12 + actor_name: monalisa + request_type: push_ruleset_bypass + data: + - ruleset_id: 410 + ruleset_name: Exclude image files + total_violations: 1 + rule_type: file_extension_restriction + resource_identifier: 827efc6d56897b048c772eb4087f854f46256132 + status: denied + requester_comment: Updating site images to follow changes in marketing. Part + 1 + expires_at: '2024-07-08T08:43:03Z' + created_at: '2024-07-01T08:43:03Z' + responses: + - id: 42 + reviewer: + actor_id: 4 + actor_name: octocat + status: denied + created_at: '2024-07-02T08:43:04Z' + url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/1 + html_url: https://github.com/octo-org/smile/exemptions/1 + - id: 12 + number: 24 + repository: + id: 1 + name: smile + full_name: octo-org/smile + organization: + id: 1 + name: octo-org + requester: + actor_id: 12 + actor_name: monalisa + request_type: push_ruleset_bypass + data: + - ruleset_id: 410 + ruleset_name: Exclude image files + total_violations: 1 + rule_type: file_extension_restriction + resource_identifier: 827efc6d56897b048c772eb4087f854f46255555 + status: denied + requester_comment: Updating site images to follow changes in marketing. Part + 2 + expires_at: '2024-07-08T07:43:03Z' + created_at: '2024-07-01T07:43:03Z' + responses: + - id: 42 + reviewer: + actor_id: 4 + actor_name: octocat + status: denied + created_at: '2024-07-02T08:43:04Z' + url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/2 + html_url: https://github.com/octo-org/smile/exemptions/2 code-scanning-organization-alert-items: value: - number: 4 @@ -219121,74 +219240,6 @@ components: received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false - push-rule-bypass-request-items: - value: - - id: 21 - number: 42 - repository: - id: 1 - name: smile - full_name: octo-org/smile - organization: - id: 1 - name: octo-org - requester: - actor_id: 12 - actor_name: monalisa - request_type: push_ruleset_bypass - data: - - ruleset_id: 410 - ruleset_name: Exclude image files - total_violations: 1 - rule_type: file_extension_restriction - resource_identifier: 827efc6d56897b048c772eb4087f854f46256132 - status: denied - requester_comment: Updating site images to follow changes in marketing. Part - 1 - expires_at: '2024-07-08T08:43:03Z' - created_at: '2024-07-01T08:43:03Z' - responses: - - id: 42 - reviewer: - actor_id: 4 - actor_name: octocat - status: denied - created_at: '2024-07-02T08:43:04Z' - url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/1 - html_url: https://github.com/octo-org/smile/exemptions/1 - - id: 12 - number: 24 - repository: - id: 1 - name: smile - full_name: octo-org/smile - organization: - id: 1 - name: octo-org - requester: - actor_id: 12 - actor_name: monalisa - request_type: push_ruleset_bypass - data: - - ruleset_id: 410 - ruleset_name: Exclude image files - total_violations: 1 - rule_type: file_extension_restriction - resource_identifier: 827efc6d56897b048c772eb4087f854f46255555 - status: denied - requester_comment: Updating site images to follow changes in marketing. Part - 2 - expires_at: '2024-07-08T07:43:03Z' - created_at: '2024-07-01T07:43:03Z' - responses: - - id: 42 - reviewer: - actor_id: 4 - actor_name: octocat - status: denied - created_at: '2024-07-02T08:43:04Z' - url: https://api.github.com/repos/octo-org/smile/bypass-requests/push-rules/2 - html_url: https://github.com/octo-org/smile/exemptions/2 code-security-configuration-list: value: - id: 17 @@ -240553,6 +240604,60 @@ components: required: true schema: type: integer + org-name-in-query: + name: organization_name + description: The name of the organization to filter on. + in: query + schema: + type: string + bypass-reviewer-name: + name: reviewer + description: Filter bypass requests by the handle of the GitHub user who reviewed + the bypass request. + in: query + required: false + schema: + type: string + bypass-requester-name: + name: requester + description: Filter bypass requests by the handle of the GitHub user who requested + the bypass. + in: query + required: false + schema: + type: string + time-period: + name: time_period + description: |- + The time period to filter by. + + For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + in: query + required: false + schema: + type: string + enum: + - hour + - day + - week + - month + default: day + bypass-request-status: + name: request_status + description: The status of the bypass request to filter on. When specified, + only requests with this status will be returned. + in: query + required: false + schema: + type: string + enum: + - completed + - cancelled + - expired + - denied + - open + - all + default: all tool-name: name: tool_name description: The name of a code scanning tool. Only results by this tool will @@ -241020,54 +241125,6 @@ components: in: query schema: type: string - bypass-reviewer-name: - name: reviewer - description: Filter bypass requests by the handle of the GitHub user who reviewed - the bypass request. - in: query - required: false - schema: - type: string - bypass-requester-name: - name: requester - description: Filter bypass requests by the handle of the GitHub user who requested - the bypass. - in: query - required: false - schema: - type: string - time-period: - name: time_period - description: |- - The time period to filter by. - - For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). - in: query - required: false - schema: - type: string - enum: - - hour - - day - - week - - month - default: day - bypass-request-status: - name: request_status - description: The status of the bypass request to filter on. When specified, - only requests with this status will be returned. - in: query - required: false - schema: - type: string - enum: - - completed - - cancelled - - expired - - denied - - open - - all - default: all role-id: name: role_id description: The unique identifier of the role. @@ -242116,6 +242173,12 @@ components: examples: default: "$ref": "#/components/examples/runner-jitconfig" + conflict: + description: Conflict + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" actions_runner_labels: description: Response content: @@ -242154,6 +242217,12 @@ components: examples: default: "$ref": "#/components/examples/runner-labels-readonly" + internal_error: + description: Internal Error + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" service_unavailable: description: Service unavailable content: @@ -242167,20 +242236,8 @@ components: type: string documentation_url: type: string - conflict: - description: Conflict - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" no_content: description: A header with no content is returned. - internal_error: - description: Internal Error - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" usage_metrics_api_disabled: description: Copilot Usage Merics API setting is disabled at the organization or enterprise level.