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 9ec46c294..b294e3f17 100644 --- a/payload-schemas/api.github.com/common/workflow-job.schema.json +++ b/payload-schemas/api.github.com/common/workflow-job.schema.json @@ -43,8 +43,7 @@ }, "steps": { "type": "array", - "items": { "$ref": "workflow-step.schema.json" }, - "minItems": 1 + "items": { "$ref": "workflow-step.schema.json" } }, "conclusion": { "type": ["string", "null"], diff --git a/payload-schemas/api.github.com/workflow_job/queued.schema.json b/payload-schemas/api.github.com/workflow_job/queued.schema.json index 99682361e..6aa989bbb 100644 --- a/payload-schemas/api.github.com/workflow_job/queued.schema.json +++ b/payload-schemas/api.github.com/workflow_job/queued.schema.json @@ -10,55 +10,17 @@ "repository": { "$ref": "common/repository.schema.json" }, "sender": { "$ref": "common/user.schema.json" }, "workflow_job": { - "type": "object", - "required": [ - "id", - "run_id", - "run_url", - "run_attempt", - "node_id", - "head_sha", - "url", - "html_url", - "status", - "conclusion", - "started_at", - "completed_at", - "name", - "steps", - "check_run_url", - "labels", - "runner_id", - "runner_name", - "runner_group_id", - "runner_group_name" - ], - "properties": { - "id": { "type": "integer" }, - "run_id": { "type": "number" }, - "run_url": { "type": "string", "format": "uri" }, - "run_attempt": { "type": "integer" }, - "head_sha": { "type": "string" }, - "node_id": { "type": "string" }, - "name": { "type": "string" }, - "check_run_url": { "type": "string", "format": "uri" }, - "html_url": { "type": "string", "format": "uri" }, - "url": { "type": "string", "format": "uri" }, - "status": { "type": "string", "enum": ["queued"] }, - "steps": { - "type": "array", - "items": { "$ref": "common/workflow-step.schema.json" } - }, - "conclusion": { "type": "null" }, - "labels": { "type": "array", "items": { "type": "string" } }, - "runner_id": { "type": ["integer", "null"] }, - "runner_name": { "type": ["string", "null"] }, - "runner_group_id": { "type": ["integer", "null"] }, - "runner_group_name": { "type": ["string", "null"] }, - "started_at": { "type": "string", "format": "date-time" }, - "completed_at": { "type": "null" } - }, - "additionalProperties": false + "allOf": [ + { "$ref": "common/workflow-job.schema.json" }, + { + "type": "object", + "required": ["status"], + "properties": { + "status": { "type": "string", "enum": ["queued"] } + }, + "tsAdditionalProperties": false + } + ] } }, "additionalProperties": false, diff --git a/payload-types/schema.d.ts b/payload-types/schema.d.ts index 7b50fb481..6fc5b3f58 100644 --- a/payload-types/schema.d.ts +++ b/payload-types/schema.d.ts @@ -6256,10 +6256,7 @@ export interface WorkflowJob { * The current status of the job. Can be `queued`, `in_progress`, or `completed`. */ status: "queued" | "in_progress" | "completed"; - /** - * @minItems 1 - */ - steps: [WorkflowStep, ...WorkflowStep[]]; + steps: WorkflowStep[]; conclusion: "success" | "failure" | "cancelled" | "skipped" | null; /** * Custom labels for the job. Specified by the [`"runs-on"` attribute](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) in the workflow YAML. @@ -6316,27 +6313,8 @@ export interface WorkflowJobQueuedEvent { installation?: InstallationLite; repository: Repository; sender: User; - workflow_job: { - id: number; - run_id: number; - run_url: string; - run_attempt: number; - head_sha: string; - node_id: string; - name: string; - check_run_url: string; - html_url: string; - url: string; + workflow_job: WorkflowJob & { status: "queued"; - steps: WorkflowStep[]; - conclusion: null; - labels: string[]; - runner_id: number | null; - runner_name: string | null; - runner_group_id: number | null; - runner_group_name: string | null; - started_at: string; - completed_at: null; }; } export interface WorkflowRunCompletedEvent {