From dd8d3b0308f25ec766239cfa5c77303a255ef183 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Thu, 7 Jul 2022 12:16:08 -0400 Subject: [PATCH] fix: add `App` to the `type` property in the `ping` event, add `workflow_job` to `App` events, `merge_commit_sha` is not always `null` for `pull_request.opened` event (#660) ref: https://github.com/octokit/webhooks.net/pull/89 ref: https://github.com/octokit/webhooks.net/commit/020bf184902d94e3c704014e2f17addc77213f50 --- payload-schemas/api.github.com/common/app.schema.json | 3 ++- payload-schemas/api.github.com/ping/event.schema.json | 5 ++++- .../api.github.com/pull_request/opened.schema.json | 2 -- payload-types/schema.d.ts | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/payload-schemas/api.github.com/common/app.schema.json b/payload-schemas/api.github.com/common/app.schema.json index 75c85d24c..d4b9cf29f 100644 --- a/payload-schemas/api.github.com/common/app.schema.json +++ b/payload-schemas/api.github.com/common/app.schema.json @@ -150,7 +150,8 @@ "team_add", "watch", "workflow_dispatch", - "workflow_run" + "workflow_run", + "workflow_job" ] } } diff --git a/payload-schemas/api.github.com/ping/event.schema.json b/payload-schemas/api.github.com/ping/event.schema.json index acec4ff09..467bff927 100644 --- a/payload-schemas/api.github.com/ping/event.schema.json +++ b/payload-schemas/api.github.com/ping/event.schema.json @@ -26,7 +26,10 @@ "deliveries_url" ], "properties": { - "type": { "type": "string", "enum": ["Repository", "Organization"] }, + "type": { + "type": "string", + "enum": ["Repository", "Organization", "App"] + }, "id": { "type": "integer" }, "name": { "type": "string" }, "active": { "type": "boolean" }, diff --git a/payload-schemas/api.github.com/pull_request/opened.schema.json b/payload-schemas/api.github.com/pull_request/opened.schema.json index a8bc1ad65..e26a28c96 100644 --- a/payload-schemas/api.github.com/pull_request/opened.schema.json +++ b/payload-schemas/api.github.com/pull_request/opened.schema.json @@ -15,7 +15,6 @@ "state", "closed_at", "merged_at", - "merge_commit_sha", "active_lock_reason", "merged_by" ], @@ -23,7 +22,6 @@ "state": { "type": "string", "enum": ["open"] }, "closed_at": { "type": "null" }, "merged_at": { "type": "null" }, - "merge_commit_sha": { "type": "null" }, "active_lock_reason": { "type": "null" }, "merged_by": { "type": "null" } }, diff --git a/payload-types/schema.d.ts b/payload-types/schema.d.ts index fc3079973..0bd1a2476 100644 --- a/payload-types/schema.d.ts +++ b/payload-types/schema.d.ts @@ -943,6 +943,7 @@ export interface App { | "watch" | "workflow_dispatch" | "workflow_run" + | "workflow_job" )[]; } export interface CheckRunCreatedEvent { @@ -4073,7 +4074,7 @@ export interface PingEvent { * The [webhook configuration](https://docs.github.com/en/rest/reference/repos#get-a-repository-webhook). */ hook: { - type: "Repository" | "Organization"; + type: "Repository" | "Organization" | "App"; id: number; name: string; active: boolean; @@ -4680,7 +4681,6 @@ export interface PullRequestOpenedEvent { state: "open"; closed_at: null; merged_at: null; - merge_commit_sha: null; active_lock_reason: null; merged_by: null; };