From bc6a4702c59e9d581f0d2e0cfd60d37bd1f19b71 Mon Sep 17 00:00:00 2001 From: Julian Mehnle Date: Sat, 20 Jul 2024 04:40:17 +0000 Subject: [PATCH 1/2] `check_suite` webhook schema override. Tolerate any string values in `check_suite.app.events` array. This works around https://github.com/github/rest-api-description/issues/3775. --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4f95ae587..e96023df7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -358,6 +358,8 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des "repository", "sender", ] } +# webhook check suite completed events can be any strings +"/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/events/items" = { enum = "" } # webhook deployment protection rule action is required "/components/schemas/webhook-deployment-protection-rule-requested" = { required = [ "action", From 013d514bc19b0884420f167186e9e7705a5f8c53 Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sat, 20 Jul 2024 17:56:47 +0800 Subject: [PATCH 2/2] Update pyproject.toml --- pyproject.toml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e96023df7..735254b68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -358,8 +358,34 @@ source = "https://raw.githubusercontent.com/github/rest-api-description/main/des "repository", "sender", ] } -# webhook check suite completed events can be any strings + +# webhook github app events enum schema is not always up to date +# https://github.com/github/rest-api-description/issues/3775 +"/components/schemas/webhooks_issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhooks_issue_2/properties/performed_via_github_app/properties/events/items" = { enum = "" } "/components/schemas/webhook-check-suite-completed/properties/check_suite/properties/app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-check-suite-requested/properties/check_suite/properties/app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-check-suite-rerequested/properties/check_suite/properties/app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-deployment-created/properties/deployment/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-deployment-status-created/properties/deployment/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-deployment-status-created/properties/deployment_status/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issue-comment-created/properties/issue/allOf/0/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issue-comment-deleted/properties/issue/allOf/0/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issue-comment-edited/properties/issue/allOf/0/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-closed/properties/issue/allOf/0/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-deleted/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-demilestoned/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-edited/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-labeled/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-locked/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-milestoned/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-opened/properties/changes/properties/old_issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-opened/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-reopened/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-transferred/properties/changes/properties/new_issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-issues-unlocked/properties/issue/properties/performed_via_github_app/properties/events/items" = { enum = "" } +"/components/schemas/webhook-meta-deleted/properties/hook/properties/events/items" = { enum = "" } + # webhook deployment protection rule action is required "/components/schemas/webhook-deployment-protection-rule-requested" = { required = [ "action",