Skip to content

Commit

Permalink
fix: add App to the type property in the ping event, add `workf…
Browse files Browse the repository at this point in the history
…low_job` to `App` events, `merge_commit_sha` is not always `null` for `pull_request.opened` event (#660)

ref: octokit/webhooks.net#89
ref: octokit/webhooks.net@020bf18
  • Loading branch information
wolfy1339 authored Jul 7, 2022
1 parent 2bd8c0e commit dd8d3b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion payload-schemas/api.github.com/common/app.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@
"team_add",
"watch",
"workflow_dispatch",
"workflow_run"
"workflow_run",
"workflow_job"
]
}
}
Expand Down
5 changes: 4 additions & 1 deletion payload-schemas/api.github.com/ping/event.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
"state",
"closed_at",
"merged_at",
"merge_commit_sha",
"active_lock_reason",
"merged_by"
],
"properties": {
"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" }
},
Expand Down
4 changes: 2 additions & 2 deletions payload-types/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,7 @@ export interface App {
| "watch"
| "workflow_dispatch"
| "workflow_run"
| "workflow_job"
)[];
}
export interface CheckRunCreatedEvent {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit dd8d3b0

Please sign in to comment.