Skip to content

Commit

Permalink
fix: update the webhook payloads with updated property information (#454
Browse files Browse the repository at this point in the history
)

* fix: `SecurityAdvisoryEvent#security_advisory.cwes.vector_string` can be `null`

* fix: `PullRequestReviewCommentEditedEvent` can have en empty `changes` property

* fix: add `auto_merge` property to `SimplePullRequest`

* fix: add missing `auto_merge` property to other `PullRequestReviewCommentEvent` actions

* fix: `PullRequestReviewCommentEvent#comment.line` can be `null`

* fix: add properties as required in `PullRequestReviewCommentEvent`

* fix: `WorkflowRun#check_suite_node_id` is a `string`

* fix: `CheckRunCreatedEvent#check_run.check_suite.conclusion` can also be a `string`

* build: generate types & index.json
  • Loading branch information
wolfy1339 committed Apr 22, 2021
1 parent 508e749 commit 1b72978
Show file tree
Hide file tree
Showing 21 changed files with 148 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
}
},
"author_association": "OWNER",
"auto_merge": null,
"active_lock_reason": null
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
}
},
"author_association": "OWNER",
"auto_merge": null,
"active_lock_reason": null
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@
}
},
"author_association": "OWNER",
"auto_merge": null,
"active_lock_reason": null
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/cancel",
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/1291536064",
"check_suite_id": 1291536064,
"check_suite_node_id": 1291536064,
"check_suite_node_id": "MDg6V29ya2Zsb3cyODIzNTI1",
"conclusion": "success",
"created_at": "2020-10-05T16:33:24Z",
"event": "repository_dispatch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/cancel",
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/1291536064",
"check_suite_id": 1291536064,
"check_suite_node_id": 1291536064,
"check_suite_node_id": "MDg6V29ya2Zsb3cyODIzNTI1",
"conclusion": null,
"created_at": "2020-10-05T16:33:24Z",
"event": "repository_dispatch",
Expand Down
39 changes: 33 additions & 6 deletions payload-examples/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -45138,6 +45138,7 @@
}
},
"author_association": "OWNER",
"auto_merge": null,
"active_lock_reason": null
},
"repository": {
Expand Down Expand Up @@ -45681,6 +45682,7 @@
}
},
"author_association": "OWNER",
"auto_merge": null,
"active_lock_reason": null
},
"repository": {
Expand Down Expand Up @@ -46210,6 +46212,7 @@
}
},
"author_association": "OWNER",
"auto_merge": null,
"active_lock_reason": null
},
"repository": {
Expand Down Expand Up @@ -46924,7 +46927,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down Expand Up @@ -47461,7 +47470,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down Expand Up @@ -48012,7 +48027,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down Expand Up @@ -48554,7 +48575,13 @@
"pull_request": {
"href": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2"
}
}
},
"start_line": null,
"original_start_line": null,
"start_side": null,
"line": 265,
"original_line": 265,
"side": "RIGHT"
},
"pull_request": {
"url": "https://api.github.com/repos/Codertocat/Hello-World/pulls/2",
Expand Down Expand Up @@ -57982,7 +58009,7 @@
"cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/cancel",
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/1291536064",
"check_suite_id": 1291536064,
"check_suite_node_id": 1291536064,
"check_suite_node_id": "MDg6V29ya2Zsb3cyODIzNTI1",
"conclusion": "success",
"created_at": "2020-10-05T16:33:24Z",
"event": "repository_dispatch",
Expand Down Expand Up @@ -58305,7 +58332,7 @@
"cancel_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/cancel",
"check_suite_url": "https://api.github.com/repos/octo-org/octo-repo/check-suites/1291536064",
"check_suite_id": 1291536064,
"check_suite_node_id": 1291536064,
"check_suite_node_id": "MDg6V29ya2Zsb3cyODIzNTI1",
"conclusion": null,
"created_at": "2020-10-05T16:33:24Z",
"event": "repository_dispatch",
Expand Down
14 changes: 13 additions & 1 deletion payload-schemas/schemas/check_run/created.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,19 @@
"type": "string",
"enum": ["queued", "in_progress", "completed"]
},
"conclusion": { "type": "null" },
"conclusion": {
"type": ["string", "null"],
"enum": [
"success",
"failure",
"neutral",
"cancelled",
"timed_out",
"action_required",
"stale",
null
]
},
"url": { "type": "string", "format": "uri" },
"before": { "type": ["string", "null"] },
"after": { "type": ["string", "null"] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"base",
"_links",
"author_association",
"auto_merge",
"active_lock_reason"
],
"type": "object",
Expand Down Expand Up @@ -134,6 +135,7 @@
"additionalProperties": false
},
"author_association": { "$ref": "author_association.schema.json" },
"auto_merge": { "type": "null" },
"active_lock_reason": {
"type": ["string", "null"],
"enum": ["resolved", "off-topic", "too heated", "spam", null]
Expand Down
2 changes: 1 addition & 1 deletion payload-schemas/schemas/common/workflow-run.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"cancel_url": { "type": "string", "format": "uri" },
"check_suite_url": { "type": "string", "format": "uri" },
"check_suite_id": { "type": "integer" },
"check_suite_node_id": { "type": "integer" },
"check_suite_node_id": { "type": "string" },
"conclusion": { "type": ["string", "null"] },
"created_at": { "type": "string", "format": "date-time" },
"event": { "type": "string" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"action": { "type": "string", "enum": ["edited"] },
"changes": {
"type": "object",
"required": ["body"],
"properties": {
"body": {
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
"html_url",
"pull_request_url",
"author_association",
"_links"
"_links",
"start_line",
"original_start_line",
"original_line",
"line",
"start_side",
"side"
],
"properties": {
"url": {
Expand Down Expand Up @@ -112,7 +118,7 @@
"description": "The side of the first line of the range for a multi-line comment."
},
"line": {
"type": "integer",
"type": ["integer", "null"],
"description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment"
},
"original_line": {
Expand Down Expand Up @@ -271,6 +277,7 @@
},
"additionalProperties": false
},
"auto_merge": { "type": "null" },
"author_association": {
"$ref": "common/author_association.schema.json"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
"html_url",
"pull_request_url",
"author_association",
"_links"
"_links",
"start_line",
"original_start_line",
"original_line",
"line",
"start_side",
"side"
],
"properties": {
"url": {
Expand Down Expand Up @@ -112,7 +118,7 @@
"description": "The side of the first line of the range for a multi-line comment."
},
"line": {
"type": "integer",
"type": ["integer", "null"],
"description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment"
},
"original_line": {
Expand Down Expand Up @@ -271,6 +277,7 @@
},
"additionalProperties": false
},
"auto_merge": { "type": "null" },
"author_association": {
"$ref": "common/author_association.schema.json"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@
"html_url",
"pull_request_url",
"author_association",
"_links"
"_links",
"start_line",
"original_start_line",
"original_line",
"line",
"start_side",
"side"
],
"properties": {
"url": {
Expand Down Expand Up @@ -137,7 +143,7 @@
"description": "The side of the first line of the range for a multi-line comment."
},
"line": {
"type": "integer",
"type": ["integer", "null"],
"description": "The line of the blob to which the comment applies. The last line of the range for a multi-line comment"
},
"original_line": {
Expand Down Expand Up @@ -296,6 +302,7 @@
},
"additionalProperties": false
},
"auto_merge": { "type": "null" },
"author_association": {
"$ref": "common/author_association.schema.json"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"type": "object",
"required": ["vector_string", "score"],
"properties": {
"vector_string": { "type": "string" },
"vector_string": { "type": ["string", "null"] },
"score": { "type": "number" }
},
"additionalProperties": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"type": "object",
"required": ["vector_string", "score"],
"properties": {
"vector_string": { "type": "string" },
"vector_string": { "type": ["string", "null"] },
"score": { "type": "number" }
},
"additionalProperties": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"type": "object",
"required": ["vector_string", "score"],
"properties": {
"vector_string": { "type": "string" },
"vector_string": { "type": ["string", "null"] },
"score": { "type": "number" }
},
"additionalProperties": false
Expand Down

0 comments on commit 1b72978

Please sign in to comment.