From 06cd3054ad40463635b5e15cf23a1f6891985728 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Mon, 11 Oct 2021 21:40:21 -0400 Subject: [PATCH] feat: `repository` is not always present on `project_card` This happens when a project card is organization wide --- .../api.github.com/project_card/converted.schema.json | 2 +- .../api.github.com/project_card/created.schema.json | 2 +- .../api.github.com/project_card/deleted.schema.json | 2 +- .../api.github.com/project_card/edited.schema.json | 2 +- .../api.github.com/project_card/moved.schema.json | 2 +- payload-types/schema.d.ts | 10 +++++----- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/payload-schemas/api.github.com/project_card/converted.schema.json b/payload-schemas/api.github.com/project_card/converted.schema.json index 2ea050e0e..7fd99cdb0 100644 --- a/payload-schemas/api.github.com/project_card/converted.schema.json +++ b/payload-schemas/api.github.com/project_card/converted.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "$id": "project_card$converted", "type": "object", - "required": ["action", "changes", "project_card", "repository", "sender"], + "required": ["action", "changes", "project_card", "sender"], "properties": { "action": { "type": "string", "enum": ["converted"] }, "changes": { diff --git a/payload-schemas/api.github.com/project_card/created.schema.json b/payload-schemas/api.github.com/project_card/created.schema.json index 37963ae85..f8420e561 100644 --- a/payload-schemas/api.github.com/project_card/created.schema.json +++ b/payload-schemas/api.github.com/project_card/created.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "$id": "project_card$created", "type": "object", - "required": ["action", "project_card", "repository", "sender"], + "required": ["action", "project_card", "sender"], "properties": { "action": { "type": "string", "enum": ["created"] }, "project_card": { "$ref": "common/project-card.schema.json" }, diff --git a/payload-schemas/api.github.com/project_card/deleted.schema.json b/payload-schemas/api.github.com/project_card/deleted.schema.json index ebe37967c..db8e2085d 100644 --- a/payload-schemas/api.github.com/project_card/deleted.schema.json +++ b/payload-schemas/api.github.com/project_card/deleted.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "$id": "project_card$deleted", "type": "object", - "required": ["action", "project_card", "repository", "sender"], + "required": ["action", "project_card", "sender"], "properties": { "action": { "type": "string", "enum": ["deleted"] }, "project_card": { "$ref": "common/project-card.schema.json" }, diff --git a/payload-schemas/api.github.com/project_card/edited.schema.json b/payload-schemas/api.github.com/project_card/edited.schema.json index e66506b9b..2dc148998 100644 --- a/payload-schemas/api.github.com/project_card/edited.schema.json +++ b/payload-schemas/api.github.com/project_card/edited.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "$id": "project_card$edited", "type": "object", - "required": ["action", "changes", "project_card", "repository", "sender"], + "required": ["action", "changes", "project_card", "sender"], "properties": { "action": { "type": "string", "enum": ["edited"] }, "changes": { diff --git a/payload-schemas/api.github.com/project_card/moved.schema.json b/payload-schemas/api.github.com/project_card/moved.schema.json index dba8fb30f..181384193 100644 --- a/payload-schemas/api.github.com/project_card/moved.schema.json +++ b/payload-schemas/api.github.com/project_card/moved.schema.json @@ -2,7 +2,7 @@ "$schema": "http://json-schema.org/draft-07/schema", "$id": "project_card$moved", "type": "object", - "required": ["action", "changes", "project_card", "repository", "sender"], + "required": ["action", "changes", "project_card", "sender"], "properties": { "action": { "type": "string", "enum": ["moved"] }, "changes": { diff --git a/payload-types/schema.d.ts b/payload-types/schema.d.ts index 64933e431..56d8efd85 100644 --- a/payload-types/schema.d.ts +++ b/payload-types/schema.d.ts @@ -4078,7 +4078,7 @@ export interface ProjectCardConvertedEvent { }; }; project_card: ProjectCard; - repository: Repository; + repository?: Repository; sender: User; organization?: Organization; installation?: InstallationLite; @@ -4107,7 +4107,7 @@ export interface ProjectCard { export interface ProjectCardCreatedEvent { action: "created"; project_card: ProjectCard; - repository: Repository; + repository?: Repository; sender: User; organization?: Organization; installation?: InstallationLite; @@ -4115,7 +4115,7 @@ export interface ProjectCardCreatedEvent { export interface ProjectCardDeletedEvent { action: "deleted"; project_card: ProjectCard; - repository: Repository; + repository?: Repository; sender: User; organization?: Organization; installation?: InstallationLite; @@ -4128,7 +4128,7 @@ export interface ProjectCardEditedEvent { }; }; project_card: ProjectCard; - repository: Repository; + repository?: Repository; sender: User; organization?: Organization; installation?: InstallationLite; @@ -4143,7 +4143,7 @@ export interface ProjectCardMovedEvent { project_card: ProjectCard & { after_id: number | null; }; - repository: Repository; + repository?: Repository; sender: User; organization?: Organization; installation?: InstallationLite;