diff --git a/clients/GitHub/etc/openapi-client-generator.state b/clients/GitHub/etc/openapi-client-generator.state index fdc6587b43c..7caf0d3fc6c 100644 --- a/clients/GitHub/etc/openapi-client-generator.state +++ b/clients/GitHub/etc/openapi-client-generator.state @@ -1,5 +1,5 @@ { - "specHash": "4bfe6378be3ffa1aed95dac111e07ebb", + "specHash": "82b1087a8dddd5516c99b2197699c7e0", "generatedFiles": { "files": [ { @@ -564,7 +564,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRulePullRequest.php", - "hash": "1515019feeb8162e78c28289262e1d24" + "hash": "3f8479325e6b6a11300642fb6a077ca8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleParamsStatusCheckConfiguration.php", @@ -600,11 +600,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRule.php", - "hash": "8519cdec25b5fee363ea63e478fc3cb1" + "hash": "b243d109b3eb353c09134a66b27c6d6f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleset.php", - "hash": "e94cb4b94aa570dacbc81a5fa6877dad" + "hash": "f1a58d8a5aa8a2f61d5cca9ab3399cf5" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/ActionsBillingUsage.php", @@ -2712,7 +2712,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRulePullRequest\/Parameters.php", - "hash": "890cf401cdff8d30a6b13d9a290b1059" + "hash": "1d433c207a9d8b3763d51f9779075ef6" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleRequiredStatusChecks\/Parameters.php", @@ -4612,11 +4612,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateOrgRuleset\/Request\/ApplicationJson.php", - "hash": "7d5d76e6c4bd5b18815d84d687645aea" + "hash": "bcfc08321d7a525a0797d7661f952d21" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/UpdateOrgRuleset\/Request\/ApplicationJson.php", - "hash": "1522d3c75fc09e21c47ddd8ec31d128f" + "hash": "331818ab81fd36e6277795f5d5d2c319" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Teams\/Create\/Request\/ApplicationJson.php", @@ -5320,11 +5320,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/CreateRepoRuleset\/Request\/ApplicationJson.php", - "hash": "45024c3728f6216dfa91bb2ff7784c65" + "hash": "9407385d8e8818776ddf26674f79241a" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/Repos\/UpdateRepoRuleset\/Request\/ApplicationJson.php", - "hash": "afa74463bd4af840f60b42d627bf8008" + "hash": "70af8a903760c21956d5868328670281" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/SecretScanning\/UpdateAlert\/Request\/ApplicationJson.php", @@ -5596,7 +5596,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Repos.php", - "hash": "44cc22eab5e09a25e5462f975ff982ea" + "hash": "5b6fbe1673276c5370be36ed9af8a076" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Operation\/Billing.php", @@ -5648,7 +5648,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/WebHooks.php", - "hash": "f410ea53774e8b7e0b1e7500abe52b96" + "hash": "8e06faae0c1f83928f13fca56c080687" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/AliasAbstract\/TietEB301A03\/Tiet504AADCF\/Tiet2FEB0C19\/TietF58BE94A.php", @@ -11564,7 +11564,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleDetailed.php", - "hash": "224cd2140c2b1e934ba658ceff52d1a4" + "hash": "e975eb7f40c042c7cf40b94b370bbffe" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/CopilotOrganizationDetails.php", @@ -11680,15 +11680,15 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetCreated.php", - "hash": "8865cd10465ff9425eb76ee95f6c429f" + "hash": "b016f00e51ffed2098e3ac2cbddbe2cd" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetDeleted.php", - "hash": "1ec01b75b354ac454f0564d0b38476d1" + "hash": "c363e1ec7d032e3e689a2eca270ffd33" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited.php", - "hash": "88d095541c692b12b3c270a30d21304d" + "hash": "1746316057881ef0ff4c75bdf4db219f" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookDeploymentReviewApproved\/WorkflowRun\/Actor.php", @@ -11920,7 +11920,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited\/Changes.php", - "hash": "1c33fb881508bc7da4ae82aac02d9542" + "hash": "8ba51e8c9ad06c9ff16e973a86079cc8" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited\/Changes\/Conditions.php", @@ -11948,11 +11948,11 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited\/Changes\/Rules.php", - "hash": "b49c288f03f3e7ba40e660d937401c70" + "hash": "7fdbee007e525f264199cc367621138c" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited\/Changes\/Rules\/Updated.php", - "hash": "309f7abf85dd75cbde9cb01092799db7" + "hash": "fe19b638d3ce1115c2ea18e2a88a1ba4" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookRepositoryRulesetEdited\/Changes\/Rules\/Updated\/Changes.php", @@ -27032,7 +27032,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrators.php", - "hash": "3a2874257b56d756d8a77df78cb41ed2" + "hash": "245c69396bc3105967a88ad7efe55ac0" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/OrganizationSimpleWebhooks.php", @@ -27652,7 +27652,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/WebHook\/CustomProperty.php", - "hash": "be06a9eea23b907fcbbe87407fde4668" + "hash": "a09df0f134944a3650f583a166ca876e" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/WebHook\/CustomPropertyValues.php", @@ -27936,7 +27936,7 @@ }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CustomProperty.php", - "hash": "3c29e7bb6806ab4516aa54f228c67c1e" + "hash": "08f5447fe2ff527431b4f7b21820cdf3" }, { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Internal\/Hydrator\/WebHook\/CustomPropertyValues.php", @@ -32001,6 +32001,10 @@ { "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/RepositoryRuleMaxFileSize\/Parameters.php", "hash": "30374f0cc216584120ff27ea39a30c18" + }, + { + "name": ".\/clients\/GitHub\/etc\/..\/\/src\/\/Schema\/WebhookCustomPropertyPromotedToEnterprise.php", + "hash": "ae2c793115e89b5b5acde4596bc61330" } ] }, diff --git a/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php b/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php index 913c2abf5be..cf9f09ea59d 100644 --- a/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php +++ b/clients/GitHub/src/Internal/Hydrator/WebHook/CustomProperty.php @@ -11,6 +11,7 @@ use ApiClients\Client\GitHub\Schema\WebhookCustomPropertyCreated; use ApiClients\Client\GitHub\Schema\WebhookCustomPropertyDeleted; use ApiClients\Client\GitHub\Schema\WebhookCustomPropertyDeleted\Definition; +use ApiClients\Client\GitHub\Schema\WebhookCustomPropertyPromotedToEnterprise; use ApiClients\Client\GitHub\Schema\WebhookCustomPropertyUpdated; use EventSauce\ObjectHydrator\IterableList; use EventSauce\ObjectHydrator\ObjectMapper; @@ -55,6 +56,7 @@ public function hydrateObject(string $className, array $payload): object 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($payload), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyDeleted' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyDeleted($payload), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyDeleted\Definition' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyDeleted⚡️Definition($payload), + 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyPromotedToEnterprise' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyPromotedToEnterprise($payload), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyUpdated' => $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyUpdated($payload), default => throw UnableToHydrateObject::noHydrationDefined($className, $this->hydrationStack), }; @@ -1050,6 +1052,136 @@ private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️Webh } } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyPromotedToEnterprise(array $payload): WebhookCustomPropertyPromotedToEnterprise + { + $properties = []; + $missingFields = []; + try { + $value = $payload['action'] ?? null; + + if ($value === null) { + $missingFields[] = 'action'; + goto after_action; + } + + $properties['action'] = $value; + + after_action: + + $value = $payload['definition'] ?? null; + + if ($value === null) { + $missingFields[] = 'definition'; + goto after_definition; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'definition'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['definition'] = $value; + + after_definition: + + $value = $payload['enterprise'] ?? null; + + if ($value === null) { + $properties['enterprise'] = null; + goto after_enterprise; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'enterprise'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['enterprise'] = $value; + + after_enterprise: + + $value = $payload['installation'] ?? null; + + if ($value === null) { + $properties['installation'] = null; + goto after_installation; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'installation'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['installation'] = $value; + + after_installation: + + $value = $payload['organization'] ?? null; + + if ($value === null) { + $properties['organization'] = null; + goto after_organization; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'organization'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['organization'] = $value; + + after_organization: + + $value = $payload['sender'] ?? null; + + if ($value === null) { + $properties['sender'] = null; + goto after_sender; + } + + if (is_array($value)) { + try { + $this->hydrationStack[] = 'sender'; + $value = $this->hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($value); + } finally { + array_pop($this->hydrationStack); + } + } + + $properties['sender'] = $value; + + after_sender: + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookCustomPropertyPromotedToEnterprise', $exception, stack: $this->hydrationStack); + } + + if (count($missingFields) > 0) { + throw UnableToHydrateObject::dueToMissingFields(WebhookCustomPropertyPromotedToEnterprise::class, $missingFields, stack: $this->hydrationStack); + } + + try { + return new WebhookCustomPropertyPromotedToEnterprise(...$properties); + } catch (Throwable $exception) { + throw UnableToHydrateObject::dueToError('ApiClients\Client\GitHub\Schema\WebhookCustomPropertyPromotedToEnterprise', $exception, stack: $this->hydrationStack); + } + } + private function hydrateApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyUpdated(array $payload): WebhookCustomPropertyUpdated { $properties = []; @@ -1219,6 +1351,7 @@ public function serializeObjectOfType(object $object, string $className): mixed 'ApiClients\Client\GitHub\Schema\SimpleUser' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($object), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyDeleted' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyDeleted($object), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyDeleted\Definition' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyDeleted⚡️Definition($object), + 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyPromotedToEnterprise' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyPromotedToEnterprise($object), 'ApiClients\Client\GitHub\Schema\WebhookCustomPropertyUpdated' => $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyUpdated($object), default => throw new LogicException("No serialization defined for $className"), }; @@ -1699,6 +1832,57 @@ private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema return $result; } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyPromotedToEnterprise(mixed $object): mixed + { + assert($object instanceof WebhookCustomPropertyPromotedToEnterprise); + $result = []; + + $action = $object->action; + after_action: $result['action'] = $action; + + $definition = $object->definition; + $definition = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️CustomProperty($definition); + after_definition: $result['definition'] = $definition; + + $enterprise = $object->enterprise; + + if ($enterprise === null) { + goto after_enterprise; + } + + $enterprise = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️EnterpriseWebhooks($enterprise); + after_enterprise: $result['enterprise'] = $enterprise; + + $installation = $object->installation; + + if ($installation === null) { + goto after_installation; + } + + $installation = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleInstallation($installation); + after_installation: $result['installation'] = $installation; + + $organization = $object->organization; + + if ($organization === null) { + goto after_organization; + } + + $organization = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️OrganizationSimpleWebhooks($organization); + after_organization: $result['organization'] = $organization; + + $sender = $object->sender; + + if ($sender === null) { + goto after_sender; + } + + $sender = $this->serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️SimpleUser($sender); + after_sender: $result['sender'] = $sender; + + return $result; + } + private function serializeObjectApiClients⚡️Client⚡️GitHub⚡️Schema⚡️WebhookCustomPropertyUpdated(mixed $object): mixed { assert($object instanceof WebhookCustomPropertyUpdated); diff --git a/clients/GitHub/src/Internal/Hydrators.php b/clients/GitHub/src/Internal/Hydrators.php index 2e73d035e07..24ac42bb147 100644 --- a/clients/GitHub/src/Internal/Hydrators.php +++ b/clients/GitHub/src/Internal/Hydrators.php @@ -1057,7 +1057,7 @@ public function hydrateObject(string $className, array $payload): object '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\DismissalApprovedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\Tool' => $this->getObjectMapperWebHook🪝CodeScanningAlert()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated\\Comment', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated\\Comment\\Reactions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated\\Comment\\User' => $this->getObjectMapperWebHook🪝CommitComment()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCreate' => $this->getObjectMapperWebHook🪝Create()->hydrateObject($className, $payload), - '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted\\Definition', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyUpdated' => $this->getObjectMapperWebHook🪝CustomProperty()->hydrateObject($className, $payload), + '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted\\Definition', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyPromotedToEnterprise', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyUpdated' => $this->getObjectMapperWebHook🪝CustomProperty()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyValuesUpdated' => $this->getObjectMapperWebHook🪝CustomPropertyValues()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDelete' => $this->getObjectMapperWebHook🪝Delete()->hydrateObject($className, $payload), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertAutoDismissed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertAutoReopened', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertDismissed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertFixed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertReintroduced', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertReopened' => $this->getObjectMapperWebHook🪝DependabotAlert()->hydrateObject($className, $payload), @@ -1436,7 +1436,7 @@ public function serializeObjectOfType(object $object, string $className): mixed '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertAppearedInBranch\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertClosedByUser\\Alert\\DismissalApprovedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertCreated\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertFixed\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\DismissedBy', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopened\\Alert\\Tool', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\MostRecentInstance', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\MostRecentInstance\\Location', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\MostRecentInstance\\Message', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\Rule', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCodeScanningAlertReopenedByUser\\Alert\\Tool' => $this->getObjectMapperWebHook🪝CodeScanningAlert()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated\\Comment', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated\\Comment\\Reactions', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCommitCommentCreated\\Comment\\User' => $this->getObjectMapperWebHook🪝CommitComment()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCreate' => $this->getObjectMapperWebHook🪝Create()->serializeObject($object), - '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted\\Definition', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyUpdated' => $this->getObjectMapperWebHook🪝CustomProperty()->serializeObject($object), + '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyDeleted\\Definition', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyPromotedToEnterprise', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyUpdated' => $this->getObjectMapperWebHook🪝CustomProperty()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookCustomPropertyValuesUpdated' => $this->getObjectMapperWebHook🪝CustomPropertyValues()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDelete' => $this->getObjectMapperWebHook🪝Delete()->serializeObject($object), '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertAutoDismissed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertAutoReopened', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertCreated', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertDismissed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertFixed', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertReintroduced', '\\ApiClients\\Client\\GitHub\\Schema\\WebhookDependabotAlertReopened' => $this->getObjectMapperWebHook🪝DependabotAlert()->serializeObject($object), diff --git a/clients/GitHub/src/Internal/WebHook/CustomProperty.php b/clients/GitHub/src/Internal/WebHook/CustomProperty.php index da7da26bcf0..8e061703578 100644 --- a/clients/GitHub/src/Internal/WebHook/CustomProperty.php +++ b/clients/GitHub/src/Internal/WebHook/CustomProperty.php @@ -19,7 +19,7 @@ public function __construct(private readonly SchemaValidator $requestSchemaValid { } - public function resolve(array $headers, array $data): Schema\WebhookCustomPropertyCreated|Schema\WebhookCustomPropertyDeleted|Schema\WebhookCustomPropertyUpdated + public function resolve(array $headers, array $data): Schema\WebhookCustomPropertyCreated|Schema\WebhookCustomPropertyDeleted|Schema\WebhookCustomPropertyPromotedToEnterprise|Schema\WebhookCustomPropertyUpdated { $error = new RuntimeException('No action matching given headers and data'); if ($headers['content-type'] === 'application/json') { @@ -67,15 +67,33 @@ public function resolve(array $headers, array $data): Schema\WebhookCustomProper $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookCustomPropertyUpdated::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookCustomPropertyPromotedToEnterprise::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); - return $this->hydrator->hydrateObject(Schema\WebhookCustomPropertyUpdated::class, $data); + return $this->hydrator->hydrateObject(Schema\WebhookCustomPropertyPromotedToEnterprise::class, $data); } catch (Throwable) { goto actions_aaaac; } } actions_aaaac: + if ($headers['content-type'] === 'application/json') { + try { + $this->requestSchemaValidator->validate($headers['user-agent'], Reader::readFromJson(Schema\WebHookHeader\UserAgent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-event'], Reader::readFromJson(Schema\WebHookHeader\XGithubEvent::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-id'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetId::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-hook-installation-target-type'], Reader::readFromJson(Schema\WebHookHeader\XGithubHookInstallationTargetType::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-github-delivery'], Reader::readFromJson(Schema\WebHookHeader\XGitHubDelivery::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($headers['x-hub-signature-256'], Reader::readFromJson(Schema\WebHookHeader\XHubSignature::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + $this->requestSchemaValidator->validate($data, Reader::readFromJson(Schema\WebhookCustomPropertyUpdated::SCHEMA_JSON, '\\cebe\\openapi\\spec\\Schema')); + + return $this->hydrator->hydrateObject(Schema\WebhookCustomPropertyUpdated::class, $data); + } catch (Throwable) { + goto actions_aaaad; + } + } + + actions_aaaad: throw $error; } } diff --git a/clients/GitHub/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php b/clients/GitHub/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php index 947cbbe45ee..a2c0f82443d 100644 --- a/clients/GitHub/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php +++ b/clients/GitHub/src/Schema/Repos/CreateOrgRuleset/Request/ApplicationJson.php @@ -567,6 +567,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php b/clients/GitHub/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php index 5697b91ccf4..4cfcf08b113 100644 --- a/clients/GitHub/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php +++ b/clients/GitHub/src/Schema/Repos/CreateRepoRuleset/Request/ApplicationJson.php @@ -347,6 +347,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php b/clients/GitHub/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php index d76eefc0f38..943d666a585 100644 --- a/clients/GitHub/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php +++ b/clients/GitHub/src/Schema/Repos/UpdateOrgRuleset/Request/ApplicationJson.php @@ -562,6 +562,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php b/clients/GitHub/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php index 922cb7360a4..1217efd581a 100644 --- a/clients/GitHub/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php +++ b/clients/GitHub/src/Schema/Repos/UpdateRepoRuleset/Request/ApplicationJson.php @@ -342,6 +342,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/RepositoryRule.php b/clients/GitHub/src/Schema/RepositoryRule.php index 47851c7e06f..68cd2c0a486 100644 --- a/clients/GitHub/src/Schema/RepositoryRule.php +++ b/clients/GitHub/src/Schema/RepositoryRule.php @@ -245,6 +245,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/RepositoryRuleDetailed.php b/clients/GitHub/src/Schema/RepositoryRuleDetailed.php index ddf203cfd75..43c3b820143 100644 --- a/clients/GitHub/src/Schema/RepositoryRuleDetailed.php +++ b/clients/GitHub/src/Schema/RepositoryRuleDetailed.php @@ -429,6 +429,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/RepositoryRulePullRequest.php b/clients/GitHub/src/Schema/RepositoryRulePullRequest.php index 8b4ae1f8a3e..775b6ff47db 100644 --- a/clients/GitHub/src/Schema/RepositoryRulePullRequest.php +++ b/clients/GitHub/src/Schema/RepositoryRulePullRequest.php @@ -43,6 +43,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -79,6 +83,7 @@ "generated", "generated" ], + "automatic_copilot_code_review_enabled": false, "dismiss_stale_reviews_on_push": false, "require_code_owner_review": false, "require_last_push_approval": false, diff --git a/clients/GitHub/src/Schema/RepositoryRulePullRequest/Parameters.php b/clients/GitHub/src/Schema/RepositoryRulePullRequest/Parameters.php index 733845954ac..934fe452951 100644 --- a/clients/GitHub/src/Schema/RepositoryRulePullRequest/Parameters.php +++ b/clients/GitHub/src/Schema/RepositoryRulePullRequest/Parameters.php @@ -30,6 +30,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -61,6 +65,7 @@ "generated", "generated" ], + "automatic_copilot_code_review_enabled": false, "dismiss_stale_reviews_on_push": false, "require_code_owner_review": false, "require_last_push_approval": false, @@ -70,6 +75,10 @@ /** * allowedMergeMethods: Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. + * automaticCopilotCodeReviewEnabled: > [!NOTE] + > `automatic_copilot_code_review_enabled` is in beta and subject to change. + + Automatically request review from Copilot for new pull requests, if the author has access to Copilot code review. * dismissStaleReviewsOnPush: New, reviewable commits pushed will dismiss previous pull request review approvals. * requireCodeOwnerReview: Require an approving review in pull requests that modify files that have a designated code owner. * requireLastPushApproval: Whether the most recent reviewable push must be approved by someone other than the person who pushed it. @@ -77,7 +86,8 @@ * requiredReviewThreadResolution: All conversations on code must be resolved before a pull request can be merged. */ public function __construct(#[MapFrom('allowed_merge_methods')] - public array|null $allowedMergeMethods, #[MapFrom('dismiss_stale_reviews_on_push')] + public array|null $allowedMergeMethods, #[MapFrom('automatic_copilot_code_review_enabled')] + public bool|null $automaticCopilotCodeReviewEnabled, #[MapFrom('dismiss_stale_reviews_on_push')] public bool $dismissStaleReviewsOnPush, #[MapFrom('require_code_owner_review')] public bool $requireCodeOwnerReview, #[MapFrom('require_last_push_approval')] public bool $requireLastPushApproval, #[MapFrom('required_approving_review_count')] diff --git a/clients/GitHub/src/Schema/RepositoryRuleset.php b/clients/GitHub/src/Schema/RepositoryRuleset.php index 12a507a1de8..fd3f4b47413 100644 --- a/clients/GitHub/src/Schema/RepositoryRuleset.php +++ b/clients/GitHub/src/Schema/RepositoryRuleset.php @@ -658,6 +658,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/WebhookCustomPropertyPromotedToEnterprise.php b/clients/GitHub/src/Schema/WebhookCustomPropertyPromotedToEnterprise.php new file mode 100644 index 00000000000..4b36855658d --- /dev/null +++ b/clients/GitHub/src/Schema/WebhookCustomPropertyPromotedToEnterprise.php @@ -0,0 +1,596 @@ + [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/WebhookRepositoryRulesetDeleted.php b/clients/GitHub/src/Schema/WebhookRepositoryRulesetDeleted.php index 61d45718e23..8309bf1b19b 100644 --- a/clients/GitHub/src/Schema/WebhookRepositoryRulesetDeleted.php +++ b/clients/GitHub/src/Schema/WebhookRepositoryRulesetDeleted.php @@ -2375,6 +2375,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited.php b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited.php index 11d74abccc3..1caa580e077 100644 --- a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited.php +++ b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited.php @@ -2375,6 +2375,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -3372,6 +3376,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -4196,6 +4204,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -5023,6 +5035,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes.php b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes.php index 5bda35b93e1..4b1008df0b7 100644 --- a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes.php +++ b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes.php @@ -411,6 +411,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -1235,6 +1239,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -2062,6 +2070,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules.php b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules.php index de4d86f9725..cb57e87f00b 100644 --- a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules.php +++ b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules.php @@ -250,6 +250,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -1074,6 +1078,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." @@ -1901,6 +1909,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules/Updated.php b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules/Updated.php index 672477b9a5e..2102113fd02 100644 --- a/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules/Updated.php +++ b/clients/GitHub/src/Schema/WebhookRepositoryRulesetEdited/Changes/Rules/Updated.php @@ -251,6 +251,10 @@ }, "description": "Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled." }, + "automatic_copilot_code_review_enabled": { + "type": "boolean", + "description": "> [!NOTE]\\n> `automatic_copilot_code_review_enabled` is in beta and subject to change.\\n\\nAutomatically request review from Copilot for new pull requests, if the author has access to Copilot code review." + }, "dismiss_stale_reviews_on_push": { "type": "boolean", "description": "New, reviewable commits pushed will dismiss previous pull request review approvals." diff --git a/clients/GitHub/src/WebHooks.php b/clients/GitHub/src/WebHooks.php index 2a0c39f1615..4429391523f 100644 --- a/clients/GitHub/src/WebHooks.php +++ b/clients/GitHub/src/WebHooks.php @@ -110,7 +110,7 @@ public function serializeWebHook(object $object): array return ['className' => $object::class, 'data' => $this->hydrator->serializeObject($object)]; } - /** @return Schema\WebhookBranchProtectionConfigurationDisabled|Schema\WebhookBranchProtectionConfigurationEnabled|Schema\WebhookBranchProtectionRuleCreated|Schema\WebhookBranchProtectionRuleDeleted|Schema\WebhookBranchProtectionRuleEdited|Schema\WebhookCheckRunCompleted|Schema\WebhookCheckRunCompletedFormEncoded|Schema\WebhookCheckRunCreated|Schema\WebhookCheckRunCreatedFormEncoded|Schema\WebhookCheckRunRequestedAction|Schema\WebhookCheckRunRequestedActionFormEncoded|Schema\WebhookCheckRunRerequested|Schema\WebhookCheckRunRerequestedFormEncoded|Schema\WebhookCheckSuiteCompleted|Schema\WebhookCheckSuiteRequested|Schema\WebhookCheckSuiteRerequested|Schema\WebhookCodeScanningAlertAppearedInBranch|Schema\WebhookCodeScanningAlertClosedByUser|Schema\WebhookCodeScanningAlertCreated|Schema\WebhookCodeScanningAlertFixed|Schema\WebhookCodeScanningAlertReopened|Schema\WebhookCodeScanningAlertReopenedByUser|Schema\WebhookCommitCommentCreated|Schema\WebhookCreate|Schema\WebhookCustomPropertyCreated|Schema\WebhookCustomPropertyDeleted|Schema\WebhookCustomPropertyUpdated|Schema\WebhookCustomPropertyValuesUpdated|Schema\WebhookDelete|Schema\WebhookDependabotAlertAutoDismissed|Schema\WebhookDependabotAlertAutoReopened|Schema\WebhookDependabotAlertCreated|Schema\WebhookDependabotAlertDismissed|Schema\WebhookDependabotAlertFixed|Schema\WebhookDependabotAlertReintroduced|Schema\WebhookDependabotAlertReopened|Schema\WebhookDeployKeyCreated|Schema\WebhookDeployKeyDeleted|Schema\WebhookDeploymentCreated|Schema\WebhookDeploymentProtectionRuleRequested|Schema\WebhookDeploymentReviewApproved|Schema\WebhookDeploymentReviewRejected|Schema\WebhookDeploymentReviewRequested|Schema\WebhookDeploymentStatusCreated|Schema\WebhookDiscussionAnswered|Schema\WebhookDiscussionCategoryChanged|Schema\WebhookDiscussionClosed|Schema\WebhookDiscussionCreated|Schema\WebhookDiscussionDeleted|Schema\WebhookDiscussionEdited|Schema\WebhookDiscussionLabeled|Schema\WebhookDiscussionLocked|Schema\WebhookDiscussionPinned|Schema\WebhookDiscussionReopened|Schema\WebhookDiscussionTransferred|Schema\WebhookDiscussionUnanswered|Schema\WebhookDiscussionUnlabeled|Schema\WebhookDiscussionUnlocked|Schema\WebhookDiscussionUnpinned|Schema\WebhookDiscussionCommentCreated|Schema\WebhookDiscussionCommentDeleted|Schema\WebhookDiscussionCommentEdited|Schema\WebhookFork|Schema\WebhookGithubAppAuthorizationRevoked|Schema\WebhookGollum|Schema\WebhookInstallationCreated|Schema\WebhookInstallationDeleted|Schema\WebhookInstallationNewPermissionsAccepted|Schema\WebhookInstallationSuspend|Schema\WebhookInstallationUnsuspend|Schema\WebhookInstallationRepositoriesAdded|Schema\WebhookInstallationRepositoriesRemoved|Schema\WebhookInstallationTargetRenamed|Schema\WebhookIssueCommentCreated|Schema\WebhookIssueCommentDeleted|Schema\WebhookIssueCommentEdited|Schema\WebhookIssuesAssigned|Schema\WebhookIssuesClosed|Schema\WebhookIssuesDeleted|Schema\WebhookIssuesDemilestoned|Schema\WebhookIssuesEdited|Schema\WebhookIssuesLabeled|Schema\WebhookIssuesLocked|Schema\WebhookIssuesMilestoned|Schema\WebhookIssuesOpened|Schema\WebhookIssuesPinned|Schema\WebhookIssuesReopened|Schema\WebhookIssuesTransferred|Schema\WebhookIssuesUnassigned|Schema\WebhookIssuesUnlabeled|Schema\WebhookIssuesUnlocked|Schema\WebhookIssuesUnpinned|Schema\WebhookLabelCreated|Schema\WebhookLabelDeleted|Schema\WebhookLabelEdited|Schema\WebhookMarketplacePurchaseCancelled|Schema\WebhookMarketplacePurchaseChanged|Schema\WebhookMarketplacePurchasePendingChange|Schema\WebhookMarketplacePurchasePendingChangeCancelled|Schema\WebhookMarketplacePurchasePurchased|Schema\WebhookMemberAdded|Schema\WebhookMemberEdited|Schema\WebhookMemberRemoved|Schema\WebhookMembershipAdded|Schema\WebhookMembershipRemoved|Schema\WebhookMergeGroupChecksRequested|Schema\WebhookMergeGroupDestroyed|Schema\WebhookMetaDeleted|Schema\WebhookMilestoneClosed|Schema\WebhookMilestoneCreated|Schema\WebhookMilestoneDeleted|Schema\WebhookMilestoneEdited|Schema\WebhookMilestoneOpened|Schema\WebhookOrgBlockBlocked|Schema\WebhookOrgBlockUnblocked|Schema\WebhookOrganizationDeleted|Schema\WebhookOrganizationMemberAdded|Schema\WebhookOrganizationMemberInvited|Schema\WebhookOrganizationMemberRemoved|Schema\WebhookOrganizationRenamed|Schema\WebhookPackagePublished|Schema\WebhookPackageUpdated|Schema\WebhookPageBuild|Schema\WebhookPersonalAccessTokenRequestApproved|Schema\WebhookPersonalAccessTokenRequestCancelled|Schema\WebhookPersonalAccessTokenRequestCreated|Schema\WebhookPersonalAccessTokenRequestDenied|Schema\WebhookPing|Schema\WebhookPingFormEncoded|Schema\WebhookProjectCardConverted|Schema\WebhookProjectCardCreated|Schema\WebhookProjectCardDeleted|Schema\WebhookProjectCardEdited|Schema\WebhookProjectCardMoved|Schema\WebhookProjectClosed|Schema\WebhookProjectCreated|Schema\WebhookProjectDeleted|Schema\WebhookProjectEdited|Schema\WebhookProjectReopened|Schema\WebhookProjectColumnCreated|Schema\WebhookProjectColumnDeleted|Schema\WebhookProjectColumnEdited|Schema\WebhookProjectColumnMoved|Schema\WebhookProjectsV2ProjectClosed|Schema\WebhookProjectsV2ProjectCreated|Schema\WebhookProjectsV2ProjectDeleted|Schema\WebhookProjectsV2ProjectEdited|Schema\WebhookProjectsV2ProjectReopened|Schema\WebhookProjectsV2ItemArchived|Schema\WebhookProjectsV2ItemConverted|Schema\WebhookProjectsV2ItemCreated|Schema\WebhookProjectsV2ItemDeleted|Schema\WebhookProjectsV2ItemEdited|Schema\WebhookProjectsV2ItemReordered|Schema\WebhookProjectsV2ItemRestored|Schema\WebhookProjectsV2StatusUpdateCreated|Schema\WebhookProjectsV2StatusUpdateDeleted|Schema\WebhookProjectsV2StatusUpdateEdited|Schema\WebhookPublic|Schema\WebhookPullRequestAssigned|Schema\WebhookPullRequestAutoMergeDisabled|Schema\WebhookPullRequestAutoMergeEnabled|Schema\WebhookPullRequestClosed|Schema\WebhookPullRequestConvertedToDraft|Schema\WebhookPullRequestDemilestoned|Schema\WebhookPullRequestDequeued|Schema\WebhookPullRequestEdited|Schema\WebhookPullRequestEnqueued|Schema\WebhookPullRequestLabeled|Schema\WebhookPullRequestLocked|Schema\WebhookPullRequestMilestoned|Schema\WebhookPullRequestOpened|Schema\WebhookPullRequestReadyForReview|Schema\WebhookPullRequestReopened|Schema\WebhookPullRequestReviewRequestRemoved|Schema\WebhookPullRequestReviewRequested|Schema\WebhookPullRequestSynchronize|Schema\WebhookPullRequestUnassigned|Schema\WebhookPullRequestUnlabeled|Schema\WebhookPullRequestUnlocked|Schema\WebhookPullRequestReviewCommentCreated|Schema\WebhookPullRequestReviewCommentDeleted|Schema\WebhookPullRequestReviewCommentEdited|Schema\WebhookPullRequestReviewDismissed|Schema\WebhookPullRequestReviewEdited|Schema\WebhookPullRequestReviewSubmitted|Schema\WebhookPullRequestReviewThreadResolved|Schema\WebhookPullRequestReviewThreadUnresolved|Schema\WebhookPush|Schema\WebhookRegistryPackagePublished|Schema\WebhookRegistryPackageUpdated|Schema\WebhookReleaseCreated|Schema\WebhookReleaseDeleted|Schema\WebhookReleaseEdited|Schema\WebhookReleasePrereleased|Schema\WebhookReleasePublished|Schema\WebhookReleaseReleased|Schema\WebhookReleaseUnpublished|Schema\WebhookRepositoryAdvisoryPublished|Schema\WebhookRepositoryAdvisoryReported|Schema\WebhookRepositoryArchived|Schema\WebhookRepositoryCreated|Schema\WebhookRepositoryDeleted|Schema\WebhookRepositoryEdited|Schema\WebhookRepositoryPrivatized|Schema\WebhookRepositoryPublicized|Schema\WebhookRepositoryRenamed|Schema\WebhookRepositoryTransferred|Schema\WebhookRepositoryUnarchived|Schema\WebhookRepositoryDispatchSample|Schema\WebhookRepositoryImport|Schema\WebhookRepositoryRulesetCreated|Schema\WebhookRepositoryRulesetDeleted|Schema\WebhookRepositoryRulesetEdited|Schema\WebhookRepositoryVulnerabilityAlertCreate|Schema\WebhookRepositoryVulnerabilityAlertDismiss|Schema\WebhookRepositoryVulnerabilityAlertReopen|Schema\WebhookRepositoryVulnerabilityAlertResolve|Schema\WebhookSecretScanningAlertCreated|Schema\WebhookSecretScanningAlertPubliclyLeaked|Schema\WebhookSecretScanningAlertReopened|Schema\WebhookSecretScanningAlertResolved|Schema\WebhookSecretScanningAlertValidated|Schema\WebhookSecretScanningAlertLocationCreated|Schema\WebhookSecretScanningAlertLocationCreatedFormEncoded|Schema\WebhookSecretScanningScanCompleted|Schema\WebhookSecurityAdvisoryPublished|Schema\WebhookSecurityAdvisoryUpdated|Schema\WebhookSecurityAdvisoryWithdrawn|Schema\WebhookSecurityAndAnalysis|Schema\WebhookSponsorshipCancelled|Schema\WebhookSponsorshipCreated|Schema\WebhookSponsorshipEdited|Schema\WebhookSponsorshipPendingCancellation|Schema\WebhookSponsorshipPendingTierChange|Schema\WebhookSponsorshipTierChanged|Schema\WebhookStarCreated|Schema\WebhookStarDeleted|Schema\WebhookStatus|Schema\WebhookSubIssuesParentIssueAdded|Schema\WebhookSubIssuesParentIssueRemoved|Schema\WebhookSubIssuesSubIssueAdded|Schema\WebhookSubIssuesSubIssueRemoved|Schema\WebhookTeamAdd|Schema\WebhookTeamAddedToRepository|Schema\WebhookTeamCreated|Schema\WebhookTeamDeleted|Schema\WebhookTeamEdited|Schema\WebhookTeamRemovedFromRepository|Schema\WebhookWatchStarted|Schema\WebhookWorkflowDispatch|Schema\WebhookWorkflowJobCompleted|Schema\WebhookWorkflowJobInProgress|Schema\WebhookWorkflowJobQueued|Schema\WebhookWorkflowJobWaiting|Schema\WebhookWorkflowRunCompleted|Schema\WebhookWorkflowRunInProgress|Schema\WebhookWorkflowRunRequested */ + /** @return Schema\WebhookBranchProtectionConfigurationDisabled|Schema\WebhookBranchProtectionConfigurationEnabled|Schema\WebhookBranchProtectionRuleCreated|Schema\WebhookBranchProtectionRuleDeleted|Schema\WebhookBranchProtectionRuleEdited|Schema\WebhookCheckRunCompleted|Schema\WebhookCheckRunCompletedFormEncoded|Schema\WebhookCheckRunCreated|Schema\WebhookCheckRunCreatedFormEncoded|Schema\WebhookCheckRunRequestedAction|Schema\WebhookCheckRunRequestedActionFormEncoded|Schema\WebhookCheckRunRerequested|Schema\WebhookCheckRunRerequestedFormEncoded|Schema\WebhookCheckSuiteCompleted|Schema\WebhookCheckSuiteRequested|Schema\WebhookCheckSuiteRerequested|Schema\WebhookCodeScanningAlertAppearedInBranch|Schema\WebhookCodeScanningAlertClosedByUser|Schema\WebhookCodeScanningAlertCreated|Schema\WebhookCodeScanningAlertFixed|Schema\WebhookCodeScanningAlertReopened|Schema\WebhookCodeScanningAlertReopenedByUser|Schema\WebhookCommitCommentCreated|Schema\WebhookCreate|Schema\WebhookCustomPropertyCreated|Schema\WebhookCustomPropertyDeleted|Schema\WebhookCustomPropertyPromotedToEnterprise|Schema\WebhookCustomPropertyUpdated|Schema\WebhookCustomPropertyValuesUpdated|Schema\WebhookDelete|Schema\WebhookDependabotAlertAutoDismissed|Schema\WebhookDependabotAlertAutoReopened|Schema\WebhookDependabotAlertCreated|Schema\WebhookDependabotAlertDismissed|Schema\WebhookDependabotAlertFixed|Schema\WebhookDependabotAlertReintroduced|Schema\WebhookDependabotAlertReopened|Schema\WebhookDeployKeyCreated|Schema\WebhookDeployKeyDeleted|Schema\WebhookDeploymentCreated|Schema\WebhookDeploymentProtectionRuleRequested|Schema\WebhookDeploymentReviewApproved|Schema\WebhookDeploymentReviewRejected|Schema\WebhookDeploymentReviewRequested|Schema\WebhookDeploymentStatusCreated|Schema\WebhookDiscussionAnswered|Schema\WebhookDiscussionCategoryChanged|Schema\WebhookDiscussionClosed|Schema\WebhookDiscussionCreated|Schema\WebhookDiscussionDeleted|Schema\WebhookDiscussionEdited|Schema\WebhookDiscussionLabeled|Schema\WebhookDiscussionLocked|Schema\WebhookDiscussionPinned|Schema\WebhookDiscussionReopened|Schema\WebhookDiscussionTransferred|Schema\WebhookDiscussionUnanswered|Schema\WebhookDiscussionUnlabeled|Schema\WebhookDiscussionUnlocked|Schema\WebhookDiscussionUnpinned|Schema\WebhookDiscussionCommentCreated|Schema\WebhookDiscussionCommentDeleted|Schema\WebhookDiscussionCommentEdited|Schema\WebhookFork|Schema\WebhookGithubAppAuthorizationRevoked|Schema\WebhookGollum|Schema\WebhookInstallationCreated|Schema\WebhookInstallationDeleted|Schema\WebhookInstallationNewPermissionsAccepted|Schema\WebhookInstallationSuspend|Schema\WebhookInstallationUnsuspend|Schema\WebhookInstallationRepositoriesAdded|Schema\WebhookInstallationRepositoriesRemoved|Schema\WebhookInstallationTargetRenamed|Schema\WebhookIssueCommentCreated|Schema\WebhookIssueCommentDeleted|Schema\WebhookIssueCommentEdited|Schema\WebhookIssuesAssigned|Schema\WebhookIssuesClosed|Schema\WebhookIssuesDeleted|Schema\WebhookIssuesDemilestoned|Schema\WebhookIssuesEdited|Schema\WebhookIssuesLabeled|Schema\WebhookIssuesLocked|Schema\WebhookIssuesMilestoned|Schema\WebhookIssuesOpened|Schema\WebhookIssuesPinned|Schema\WebhookIssuesReopened|Schema\WebhookIssuesTransferred|Schema\WebhookIssuesUnassigned|Schema\WebhookIssuesUnlabeled|Schema\WebhookIssuesUnlocked|Schema\WebhookIssuesUnpinned|Schema\WebhookLabelCreated|Schema\WebhookLabelDeleted|Schema\WebhookLabelEdited|Schema\WebhookMarketplacePurchaseCancelled|Schema\WebhookMarketplacePurchaseChanged|Schema\WebhookMarketplacePurchasePendingChange|Schema\WebhookMarketplacePurchasePendingChangeCancelled|Schema\WebhookMarketplacePurchasePurchased|Schema\WebhookMemberAdded|Schema\WebhookMemberEdited|Schema\WebhookMemberRemoved|Schema\WebhookMembershipAdded|Schema\WebhookMembershipRemoved|Schema\WebhookMergeGroupChecksRequested|Schema\WebhookMergeGroupDestroyed|Schema\WebhookMetaDeleted|Schema\WebhookMilestoneClosed|Schema\WebhookMilestoneCreated|Schema\WebhookMilestoneDeleted|Schema\WebhookMilestoneEdited|Schema\WebhookMilestoneOpened|Schema\WebhookOrgBlockBlocked|Schema\WebhookOrgBlockUnblocked|Schema\WebhookOrganizationDeleted|Schema\WebhookOrganizationMemberAdded|Schema\WebhookOrganizationMemberInvited|Schema\WebhookOrganizationMemberRemoved|Schema\WebhookOrganizationRenamed|Schema\WebhookPackagePublished|Schema\WebhookPackageUpdated|Schema\WebhookPageBuild|Schema\WebhookPersonalAccessTokenRequestApproved|Schema\WebhookPersonalAccessTokenRequestCancelled|Schema\WebhookPersonalAccessTokenRequestCreated|Schema\WebhookPersonalAccessTokenRequestDenied|Schema\WebhookPing|Schema\WebhookPingFormEncoded|Schema\WebhookProjectCardConverted|Schema\WebhookProjectCardCreated|Schema\WebhookProjectCardDeleted|Schema\WebhookProjectCardEdited|Schema\WebhookProjectCardMoved|Schema\WebhookProjectClosed|Schema\WebhookProjectCreated|Schema\WebhookProjectDeleted|Schema\WebhookProjectEdited|Schema\WebhookProjectReopened|Schema\WebhookProjectColumnCreated|Schema\WebhookProjectColumnDeleted|Schema\WebhookProjectColumnEdited|Schema\WebhookProjectColumnMoved|Schema\WebhookProjectsV2ProjectClosed|Schema\WebhookProjectsV2ProjectCreated|Schema\WebhookProjectsV2ProjectDeleted|Schema\WebhookProjectsV2ProjectEdited|Schema\WebhookProjectsV2ProjectReopened|Schema\WebhookProjectsV2ItemArchived|Schema\WebhookProjectsV2ItemConverted|Schema\WebhookProjectsV2ItemCreated|Schema\WebhookProjectsV2ItemDeleted|Schema\WebhookProjectsV2ItemEdited|Schema\WebhookProjectsV2ItemReordered|Schema\WebhookProjectsV2ItemRestored|Schema\WebhookProjectsV2StatusUpdateCreated|Schema\WebhookProjectsV2StatusUpdateDeleted|Schema\WebhookProjectsV2StatusUpdateEdited|Schema\WebhookPublic|Schema\WebhookPullRequestAssigned|Schema\WebhookPullRequestAutoMergeDisabled|Schema\WebhookPullRequestAutoMergeEnabled|Schema\WebhookPullRequestClosed|Schema\WebhookPullRequestConvertedToDraft|Schema\WebhookPullRequestDemilestoned|Schema\WebhookPullRequestDequeued|Schema\WebhookPullRequestEdited|Schema\WebhookPullRequestEnqueued|Schema\WebhookPullRequestLabeled|Schema\WebhookPullRequestLocked|Schema\WebhookPullRequestMilestoned|Schema\WebhookPullRequestOpened|Schema\WebhookPullRequestReadyForReview|Schema\WebhookPullRequestReopened|Schema\WebhookPullRequestReviewRequestRemoved|Schema\WebhookPullRequestReviewRequested|Schema\WebhookPullRequestSynchronize|Schema\WebhookPullRequestUnassigned|Schema\WebhookPullRequestUnlabeled|Schema\WebhookPullRequestUnlocked|Schema\WebhookPullRequestReviewCommentCreated|Schema\WebhookPullRequestReviewCommentDeleted|Schema\WebhookPullRequestReviewCommentEdited|Schema\WebhookPullRequestReviewDismissed|Schema\WebhookPullRequestReviewEdited|Schema\WebhookPullRequestReviewSubmitted|Schema\WebhookPullRequestReviewThreadResolved|Schema\WebhookPullRequestReviewThreadUnresolved|Schema\WebhookPush|Schema\WebhookRegistryPackagePublished|Schema\WebhookRegistryPackageUpdated|Schema\WebhookReleaseCreated|Schema\WebhookReleaseDeleted|Schema\WebhookReleaseEdited|Schema\WebhookReleasePrereleased|Schema\WebhookReleasePublished|Schema\WebhookReleaseReleased|Schema\WebhookReleaseUnpublished|Schema\WebhookRepositoryAdvisoryPublished|Schema\WebhookRepositoryAdvisoryReported|Schema\WebhookRepositoryArchived|Schema\WebhookRepositoryCreated|Schema\WebhookRepositoryDeleted|Schema\WebhookRepositoryEdited|Schema\WebhookRepositoryPrivatized|Schema\WebhookRepositoryPublicized|Schema\WebhookRepositoryRenamed|Schema\WebhookRepositoryTransferred|Schema\WebhookRepositoryUnarchived|Schema\WebhookRepositoryDispatchSample|Schema\WebhookRepositoryImport|Schema\WebhookRepositoryRulesetCreated|Schema\WebhookRepositoryRulesetDeleted|Schema\WebhookRepositoryRulesetEdited|Schema\WebhookRepositoryVulnerabilityAlertCreate|Schema\WebhookRepositoryVulnerabilityAlertDismiss|Schema\WebhookRepositoryVulnerabilityAlertReopen|Schema\WebhookRepositoryVulnerabilityAlertResolve|Schema\WebhookSecretScanningAlertCreated|Schema\WebhookSecretScanningAlertPubliclyLeaked|Schema\WebhookSecretScanningAlertReopened|Schema\WebhookSecretScanningAlertResolved|Schema\WebhookSecretScanningAlertValidated|Schema\WebhookSecretScanningAlertLocationCreated|Schema\WebhookSecretScanningAlertLocationCreatedFormEncoded|Schema\WebhookSecretScanningScanCompleted|Schema\WebhookSecurityAdvisoryPublished|Schema\WebhookSecurityAdvisoryUpdated|Schema\WebhookSecurityAdvisoryWithdrawn|Schema\WebhookSecurityAndAnalysis|Schema\WebhookSponsorshipCancelled|Schema\WebhookSponsorshipCreated|Schema\WebhookSponsorshipEdited|Schema\WebhookSponsorshipPendingCancellation|Schema\WebhookSponsorshipPendingTierChange|Schema\WebhookSponsorshipTierChanged|Schema\WebhookStarCreated|Schema\WebhookStarDeleted|Schema\WebhookStatus|Schema\WebhookSubIssuesParentIssueAdded|Schema\WebhookSubIssuesParentIssueRemoved|Schema\WebhookSubIssuesSubIssueAdded|Schema\WebhookSubIssuesSubIssueRemoved|Schema\WebhookTeamAdd|Schema\WebhookTeamAddedToRepository|Schema\WebhookTeamCreated|Schema\WebhookTeamDeleted|Schema\WebhookTeamEdited|Schema\WebhookTeamRemovedFromRepository|Schema\WebhookWatchStarted|Schema\WebhookWorkflowDispatch|Schema\WebhookWorkflowJobCompleted|Schema\WebhookWorkflowJobInProgress|Schema\WebhookWorkflowJobQueued|Schema\WebhookWorkflowJobWaiting|Schema\WebhookWorkflowRunCompleted|Schema\WebhookWorkflowRunInProgress|Schema\WebhookWorkflowRunRequested */ public function resolve(array $headers, array $data): object { $headers = (static function ($headers): array { diff --git a/etc/specs/GitHub/current.spec.yaml b/etc/specs/GitHub/current.spec.yaml index 849a51e59f0..9dfd008ebfe 100644 --- a/etc/specs/GitHub/current.spec.yaml +++ b/etc/specs/GitHub/current.spec.yaml @@ -52954,6 +52954,72 @@ webhooks: - business - organization - app + custom-property-promoted-to-enterprise: + post: + summary: |- + This event occurs when there is activity relating to a custom property. + + For more information, see "[Managing custom properties for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-custom-properties-for-repositories-in-your-organization)". For information about the APIs to manage custom properties, see "[Custom properties](https://docs.github.com/rest/orgs/custom-properties)" in the REST API documentation. + + To subscribe to this event, a GitHub App must have at least read-level access for the "Custom properties" organization permission. + description: A custom property was promoted to an enterprise. + operationId: custom-property/promote-to-enterprise + externalDocs: + url: https://docs.github.com/webhooks/webhook-events-and-payloads#custom_property + parameters: + - name: User-Agent + in: header + example: GitHub-Hookshot/123abc + schema: + type: string + - name: X-Github-Hook-Id + in: header + example: 12312312 + schema: + type: string + - name: X-Github-Event + in: header + example: issues + schema: + type: string + - name: X-Github-Hook-Installation-Target-Id + in: header + example: 123123 + schema: + type: string + - name: X-Github-Hook-Installation-Target-Type + in: header + example: repository + schema: + type: string + - name: X-GitHub-Delivery + in: header + example: 0b989ba4-242f-11e5-81e1-c7b6966d2516 + schema: + type: string + - name: X-Hub-Signature-256 + in: header + example: sha256=6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-custom-property-promoted-to-enterprise" + responses: + '200': + description: Return a 200 status to indicate that the data was received + successfully + x-github: + githubCloudOnly: false + category: webhooks + subcategory: custom_property + supported-webhook-types: + - business + - organization + - app custom-property-updated: post: summary: |- @@ -79622,6 +79688,13 @@ components: - merge - squash - rebase + automatic_copilot_code_review_enabled: + type: boolean + description: |- + > [!NOTE] + > `automatic_copilot_code_review_enabled` is in beta and subject to change. + + Automatically request review from Copilot for new pull requests, if the author has access to Copilot code review. dismiss_stale_reviews_on_push: type: boolean description: New, reviewable commits pushed will dismiss previous pull @@ -109598,6 +109671,27 @@ components: required: - action - definition + webhook-custom-property-promoted-to-enterprise: + title: custom property promoted to business event + type: object + properties: + action: + type: string + enum: + - promote_to_enterprise + definition: + "$ref": "#/components/schemas/custom-property" + enterprise: + "$ref": "#/components/schemas/enterprise-webhooks" + installation: + "$ref": "#/components/schemas/simple-installation" + organization: + "$ref": "#/components/schemas/organization-simple-webhooks" + sender: + "$ref": "#/components/schemas/simple-user" + required: + - action + - definition webhook-custom-property-updated: title: custom property updated event type: object