diff --git a/payload-examples/api.github.com/index.json b/payload-examples/api.github.com/index.json index 56588ee65..932232678 100644 --- a/payload-examples/api.github.com/index.json +++ b/payload-examples/api.github.com/index.json @@ -69749,12 +69749,14 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "completed", "conclusion": "failure", "started_at": "2021-08-05T10:34:58Z", "completed_at": "2021-08-05T10:38:16Z", + "created_at": "2021-08-05T10:33:58Z", "name": "linters", "steps": [ { @@ -70004,11 +70006,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "completed", "conclusion": "success", "started_at": "2021-08-05T10:34:58Z", + "created_at": "2021-08-05T10:33:58Z", "completed_at": "2021-08-05T10:38:16Z", "name": "linters", "steps": [ @@ -70227,11 +70231,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "in_progress", "conclusion": null, "started_at": "2021-09-13T02:21:13Z", + "created_at": "2021-09-13T02:21:13Z", "completed_at": null, "name": "Analyze (javascript)", "steps": [ @@ -70384,11 +70390,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "queued", "conclusion": null, "started_at": "2021-09-13T02:21:13Z", + "created_at": "2021-09-13T02:21:13Z", "completed_at": null, "name": "update", "steps": [], diff --git a/payload-examples/api.github.com/workflow_job/completed.failure.with-organization.payload.json b/payload-examples/api.github.com/workflow_job/completed.failure.with-organization.payload.json index 712b6b3dd..c42acd75d 100644 --- a/payload-examples/api.github.com/workflow_job/completed.failure.with-organization.payload.json +++ b/payload-examples/api.github.com/workflow_job/completed.failure.with-organization.payload.json @@ -7,12 +7,14 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "completed", "conclusion": "failure", "started_at": "2021-08-05T10:34:58Z", "completed_at": "2021-08-05T10:38:16Z", + "created_at": "2021-08-05T10:33:58Z", "name": "linters", "steps": [ { diff --git a/payload-examples/api.github.com/workflow_job/completed.success.with-organization.payload.json b/payload-examples/api.github.com/workflow_job/completed.success.with-organization.payload.json index 74ab99eeb..4db5310d7 100644 --- a/payload-examples/api.github.com/workflow_job/completed.success.with-organization.payload.json +++ b/payload-examples/api.github.com/workflow_job/completed.success.with-organization.payload.json @@ -7,11 +7,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "completed", "conclusion": "success", "started_at": "2021-08-05T10:34:58Z", + "created_at": "2021-08-05T10:33:58Z", "completed_at": "2021-08-05T10:38:16Z", "name": "linters", "steps": [ diff --git a/payload-examples/api.github.com/workflow_job/in_progress.payload.json b/payload-examples/api.github.com/workflow_job/in_progress.payload.json index b78a416f7..94433a14a 100644 --- a/payload-examples/api.github.com/workflow_job/in_progress.payload.json +++ b/payload-examples/api.github.com/workflow_job/in_progress.payload.json @@ -7,11 +7,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "in_progress", "conclusion": null, "started_at": "2021-09-13T02:21:13Z", + "created_at": "2021-09-13T02:21:13Z", "completed_at": null, "name": "Analyze (javascript)", "steps": [ diff --git a/payload-examples/api.github.com/workflow_job/queued.payload.json b/payload-examples/api.github.com/workflow_job/queued.payload.json index 7245aac78..cb97705c5 100644 --- a/payload-examples/api.github.com/workflow_job/queued.payload.json +++ b/payload-examples/api.github.com/workflow_job/queued.payload.json @@ -7,11 +7,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "queued", "conclusion": null, "started_at": "2021-09-13T02:21:13Z", + "created_at": "2021-09-13T02:21:13Z", "completed_at": null, "name": "update", "steps": [], diff --git a/payload-schemas/api.github.com/common/app.schema.json b/payload-schemas/api.github.com/common/app.schema.json index ee2723667..c6fe4f391 100644 --- a/payload-schemas/api.github.com/common/app.schema.json +++ b/payload-schemas/api.github.com/common/app.schema.json @@ -46,6 +46,8 @@ "emails": { "type": "string", "enum": ["read", "write"] }, "environments": { "type": "string", "enum": ["read", "write"] }, "followers": { "type": "string", "enum": ["read", "write"] }, + "gpg_keys": { "type": "string", "enum": ["read", "write"] }, + "interaction_limits": { "type": "string", "enum": ["read", "write"] }, "issues": { "type": "string", "enum": ["read", "write"] }, "keys": { "type": "string", "enum": ["read", "write"] }, "members": { "type": "string", "enum": ["read", "write"] }, @@ -76,6 +78,7 @@ }, "packages": { "type": "string", "enum": ["read", "write"] }, "pages": { "type": "string", "enum": ["read", "write"] }, + "plan": { "type": "string", "enum": ["read", "write"] }, "pull_requests": { "type": "string", "enum": ["read", "write"] }, "repository_hooks": { "type": "string", "enum": ["read", "write"] }, "repository_projects": { "type": "string", "enum": ["read", "write"] }, @@ -90,9 +93,11 @@ "enum": ["read", "write"] }, "single_file": { "type": "string", "enum": ["read", "write"] }, + "starring": { "type": "string", "enum": ["read", "write"] }, "statuses": { "type": "string", "enum": ["read", "write"] }, "team_discussions": { "type": "string", "enum": ["read", "write"] }, "vulnerability_alerts": { "type": "string", "enum": ["read", "write"] }, + "watching": { "type": "string", "enum": ["read", "write"] }, "workflows": { "type": "string", "enum": ["read", "write"] } }, "additionalProperties": false @@ -138,6 +143,7 @@ "pull_request", "pull_request_review", "pull_request_review_comment", + "pull_request_review_thread", "push", "registry_package", "release", diff --git a/payload-schemas/api.github.com/common/pull-request-review-comment.schema.json b/payload-schemas/api.github.com/common/pull-request-review-comment.schema.json index 8e90cf2a3..4fd34df87 100644 --- a/payload-schemas/api.github.com/common/pull-request-review-comment.schema.json +++ b/payload-schemas/api.github.com/common/pull-request-review-comment.schema.json @@ -127,6 +127,11 @@ "in_reply_to_id": { "type": "integer", "description": "The comment ID to reply to." + }, + "subject_type": { + "description": "The level at which the comment is targeted, can be a diff line or a file.", + "type": "string", + "enum": ["line", "file"] } }, "additionalProperties": false, diff --git a/payload-schemas/api.github.com/common/pull-request.schema.json b/payload-schemas/api.github.com/common/pull-request.schema.json index 30028f0ac..56d3ac818 100644 --- a/payload-schemas/api.github.com/common/pull-request.schema.json +++ b/payload-schemas/api.github.com/common/pull-request.schema.json @@ -115,7 +115,9 @@ "ref": { "type": "string" }, "sha": { "type": "string" }, "user": { "$ref": "user.schema.json" }, - "repo": { "$ref": "repository.schema.json" } + "repo": { + "oneOf": [{ "$ref": "repository.schema.json" }, { "type": "null" }] + } }, "additionalProperties": false }, diff --git a/payload-schemas/api.github.com/common/workflow-job.schema.json b/payload-schemas/api.github.com/common/workflow-job.schema.json index c1dd1cb29..668f2a2bb 100644 --- a/payload-schemas/api.github.com/common/workflow-job.schema.json +++ b/payload-schemas/api.github.com/common/workflow-job.schema.json @@ -14,6 +14,7 @@ "conclusion", "started_at", "completed_at", + "created_at", "name", "steps", "check_run_url", @@ -22,7 +23,8 @@ "runner_name", "runner_group_id", "runner_group_name", - "workflow_name" + "workflow_name", + "head_branch" ], "description": "The workflow job. Many `workflow_job` keys, such as `head_sha`, `conclusion`, and `started_at` are the same as those in a [`check_run`](#check_run) object.", "type": "object", @@ -75,7 +77,15 @@ "completed_at": { "oneOf": [{ "type": "string", "format": "date-time" }, { "type": "null" }] }, - "workflow_name": { "type": "string" } + "workflow_name": { + "type": ["string", "null"], + "description": "The name of the workflow." + }, + "head_branch": { + "type": ["string", "null"], + "description": "The name of the current branch." + }, + "created_at": { "type": "string", "format": "date-time" } }, "additionalProperties": false, "title": "Workflow Job" diff --git a/payload-schemas/api.github.com/pull_request/demilestoned.schema.json b/payload-schemas/api.github.com/pull_request/demilestoned.schema.json new file mode 100644 index 000000000..42096cb1a --- /dev/null +++ b/payload-schemas/api.github.com/pull_request/demilestoned.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "pull_request$demilestoned", + "type": "object", + "required": [ + "action", + "number", + "pull_request", + "milestone", + "repository", + "sender" + ], + "properties": { + "action": { "type": "string", "enum": ["demilestoned"] }, + "number": { "type": "integer", "description": "The pull request number." }, + "pull_request": { + "allOf": [ + { "$ref": "common/pull-request.schema.json" }, + { + "type": "object", + "required": ["milestone"], + "properties": { + "milestone": { "$ref": "common/milestone.schema.json" } + }, + "tsAdditionalProperties": false + } + ] + }, + "milestone": { "$ref": "common/milestone.schema.json" }, + "repository": { "$ref": "common/repository.schema.json" }, + "sender": { "$ref": "common/user.schema.json" }, + "installation": { "$ref": "common/installation-lite.schema.json" }, + "organization": { "$ref": "common/organization.schema.json" } + }, + "additionalProperties": false, + "title": "pull_request demilestoned event" +} diff --git a/payload-schemas/api.github.com/pull_request/milestoned.schema.json b/payload-schemas/api.github.com/pull_request/milestoned.schema.json new file mode 100644 index 000000000..60969cc08 --- /dev/null +++ b/payload-schemas/api.github.com/pull_request/milestoned.schema.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "pull_request$milestoned", + "type": "object", + "required": [ + "action", + "number", + "pull_request", + "milestone", + "repository", + "sender" + ], + "properties": { + "action": { "type": "string", "enum": ["milestoned"] }, + "number": { "type": "integer", "description": "The pull request number." }, + "pull_request": { + "allOf": [ + { "$ref": "common/pull-request.schema.json" }, + { + "type": "object", + "required": ["milestone"], + "properties": { + "milestone": { "$ref": "common/milestone.schema.json" } + }, + "tsAdditionalProperties": false + } + ] + }, + "milestone": { "$ref": "common/milestone.schema.json" }, + "repository": { "$ref": "common/repository.schema.json" }, + "sender": { "$ref": "common/user.schema.json" }, + "installation": { "$ref": "common/installation-lite.schema.json" }, + "organization": { "$ref": "common/organization.schema.json" } + }, + "additionalProperties": false, + "title": "pull_request milestoned event" +} diff --git a/payload-types/schema.d.ts b/payload-types/schema.d.ts index 80d8edbe8..598394413 100644 --- a/payload-types/schema.d.ts +++ b/payload-types/schema.d.ts @@ -281,10 +281,12 @@ export type PullRequestEvent = | PullRequestAutoMergeEnabledEvent | PullRequestClosedEvent | PullRequestConvertedToDraftEvent + | PullRequestDemilestonedEvent | PullRequestDequeuedEvent | PullRequestEditedEvent | PullRequestLabeledEvent | PullRequestLockedEvent + | PullRequestMilestonedEvent | PullRequestOpenedEvent | PullRequestQueuedEvent | PullRequestReadyForReviewEvent @@ -1058,6 +1060,8 @@ export interface App { emails?: "read" | "write"; environments?: "read" | "write"; followers?: "read" | "write"; + gpg_keys?: "read" | "write"; + interaction_limits?: "read" | "write"; issues?: "read" | "write"; keys?: "read" | "write"; members?: "read" | "write"; @@ -1073,6 +1077,7 @@ export interface App { organization_user_blocking?: "read" | "write"; packages?: "read" | "write"; pages?: "read" | "write"; + plan?: "read" | "write"; pull_requests?: "read" | "write"; repository_hooks?: "read" | "write"; repository_projects?: "read" | "write"; @@ -1081,9 +1086,11 @@ export interface App { security_events?: "read" | "write"; security_scanning_alert?: "read" | "write"; single_file?: "read" | "write"; + starring?: "read" | "write"; statuses?: "read" | "write"; team_discussions?: "read" | "write"; vulnerability_alerts?: "read" | "write"; + watching?: "read" | "write"; workflows?: "read" | "write"; }; /** @@ -1125,6 +1132,7 @@ export interface App { | "pull_request" | "pull_request_review" | "pull_request_review_comment" + | "pull_request_review_thread" | "push" | "registry_package" | "release" @@ -5454,7 +5462,7 @@ export interface PullRequest { ref: string; sha: string; user: User; - repo: Repository; + repo: Repository | null; }; base: { label: string; @@ -5577,6 +5585,21 @@ export interface PullRequestConvertedToDraftEvent { organization?: Organization; sender: User; } +export interface PullRequestDemilestonedEvent { + action: "demilestoned"; + /** + * The pull request number. + */ + number: number; + pull_request: PullRequest & { + milestone: Milestone; + }; + milestone: Milestone; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} export interface PullRequestDequeuedEvent { action: "dequeued"; /** @@ -5655,6 +5678,21 @@ export interface PullRequestLockedEvent { organization?: Organization; sender: User; } +export interface PullRequestMilestonedEvent { + action: "milestoned"; + /** + * The pull request number. + */ + number: number; + pull_request: PullRequest & { + milestone: Milestone; + }; + milestone: Milestone; + repository: Repository; + sender: User; + installation?: InstallationLite; + organization?: Organization; +} export interface PullRequestOpenedEvent { action: "opened"; /** @@ -6062,6 +6100,10 @@ export interface PullRequestReviewComment { * The comment ID to reply to. */ in_reply_to_id?: number; + /** + * The level at which the comment is targeted, can be a diff line or a file. + */ + subject_type?: "line" | "file"; } export interface PullRequestReviewCommentDeletedEvent { action: "deleted"; @@ -7604,7 +7646,15 @@ export interface WorkflowJob { runner_group_name: string | null; started_at: string; completed_at: string | null; - workflow_name: string; + /** + * The name of the workflow. + */ + workflow_name: string | null; + /** + * The name of the current branch. + */ + head_branch: string | null; + created_at: string; } export interface WorkflowStepInProgress { name: string;