From d963105f4196bf5cf2c7c4ecb6cd16f867b2ecdb Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sun, 17 Jan 2021 19:53:44 -0500 Subject: [PATCH 1/3] fix: add missing properties to pull_request_review.submitted --- .../schemas/pull_request_review/submitted.schema.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/payload-schemas/schemas/pull_request_review/submitted.schema.json b/payload-schemas/schemas/pull_request_review/submitted.schema.json index d05daf3f2..ed2038a7c 100644 --- a/payload-schemas/schemas/pull_request_review/submitted.schema.json +++ b/payload-schemas/schemas/pull_request_review/submitted.schema.json @@ -92,6 +92,7 @@ "requested_teams", "labels", "milestone", + "draft", "commits_url", "review_comments_url", "review_comment_url", @@ -100,7 +101,8 @@ "head", "base", "_links", - "author_association" + "author_association", + "active_lock_reason" ], "properties": { "url": { "type": "string" }, @@ -197,6 +199,7 @@ }, "additionalProperties": false }, + "draft": { "type": "boolean" }, "commits_url": { "type": "string" }, "review_comments_url": { "type": "string" }, "review_comment_url": { "type": "string" }, @@ -388,6 +391,10 @@ "NONE", "OWNER" ] + }, + "active_lock_reason": { + "type": ["string", "null"], + "enum": ["resolved", "off-topic", "too heated", "spam", null] } }, "additionalProperties": false From 671f2198377896fbdb27871a9c1c3ec9cc2afe78 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sun, 17 Jan 2021 19:54:09 -0500 Subject: [PATCH 2/3] fix: adjust payload examples to validate --- index.json | 8 ++++++-- .../pull_request_review/submitted.payload.json | 4 +++- .../submitted.with-organization.payload.json | 4 +++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/index.json b/index.json index 69706c49d..def00f6d4 100644 --- a/index.json +++ b/index.json @@ -37475,6 +37475,7 @@ } ], "milestone": null, + "draft": false, "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/comments{/number}", @@ -37744,7 +37745,8 @@ "href": "https://api.github.com/repos/Codertocat/Hello-World/statuses/ec26c3e57ca3a959ca5aad62de7213c562f8c821" } }, - "author_association": "OWNER" + "author_association": "OWNER", + "active_lock_reason": null }, "repository": { "id": 186853002, @@ -38001,6 +38003,7 @@ } ], "milestone": null, + "draft": false, "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/comments{/number}", @@ -38270,7 +38273,8 @@ "href": "https://api.github.com/repos/Codertocat/Hello-World/statuses/ec26c3e57ca3a959ca5aad62de7213c562f8c821" } }, - "author_association": "OWNER" + "author_association": "OWNER", + "active_lock_reason": null }, "repository": { "id": 186853002, diff --git a/payload-examples/api.github.com/pull_request_review/submitted.payload.json b/payload-examples/api.github.com/pull_request_review/submitted.payload.json index 9838ff6f2..3f249919f 100644 --- a/payload-examples/api.github.com/pull_request_review/submitted.payload.json +++ b/payload-examples/api.github.com/pull_request_review/submitted.payload.json @@ -134,6 +134,7 @@ } ], "milestone": null, + "draft": false, "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/comments{/number}", @@ -401,7 +402,8 @@ "href": "https://api.github.com/repos/Codertocat/Hello-World/statuses/ec26c3e57ca3a959ca5aad62de7213c562f8c821" } }, - "author_association": "OWNER" + "author_association": "OWNER", + "active_lock_reason": null }, "repository": { "id": 186853002, diff --git a/payload-examples/api.github.com/pull_request_review/submitted.with-organization.payload.json b/payload-examples/api.github.com/pull_request_review/submitted.with-organization.payload.json index 3d8b23dc0..85933a605 100644 --- a/payload-examples/api.github.com/pull_request_review/submitted.with-organization.payload.json +++ b/payload-examples/api.github.com/pull_request_review/submitted.with-organization.payload.json @@ -134,6 +134,7 @@ } ], "milestone": null, + "draft": false, "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/commits", "review_comments_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2/comments", "review_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/comments{/number}", @@ -401,7 +402,8 @@ "href": "https://api.github.com/repos/Codertocat/Hello-World/statuses/ec26c3e57ca3a959ca5aad62de7213c562f8c821" } }, - "author_association": "OWNER" + "author_association": "OWNER", + "active_lock_reason": null }, "repository": { "id": 186853002, From cc8465f5c62a60fc37169c86a06c85415ae96458 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Sun, 17 Jan 2021 19:54:20 -0500 Subject: [PATCH 3/3] build: generate types --- schema.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/schema.d.ts b/schema.d.ts index d70ddc71b..c9df46427 100644 --- a/schema.d.ts +++ b/schema.d.ts @@ -7138,6 +7138,7 @@ export interface PullRequestReviewSubmittedEvent { due_on: string; closed_at: string | null; } | null; + draft: boolean; commits_url: string; review_comments_url: string; review_comment_url: string; @@ -7230,6 +7231,7 @@ export interface PullRequestReviewSubmittedEvent { | "MEMBER" | "NONE" | "OWNER"; + active_lock_reason: "resolved" | "off-topic" | "too heated" | "spam" | null; }; repository: Repository; installation?: Installation;