From 6d11ea91e1b24135802fd5c11c9a841d295c2259 Mon Sep 17 00:00:00 2001 From: wolfy1339 Date: Tue, 28 Jun 2022 13:34:29 -0400 Subject: [PATCH] feat: new `referenced_workflow` property on `workflow_run` --- .../common/deployment-workflow-run.schema.json | 6 +++++- .../common/referenced-workflow.schema.json | 14 ++++++++++++++ .../api.github.com/common/workflow-run.schema.json | 4 ++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 payload-schemas/api.github.com/common/referenced-workflow.schema.json diff --git a/payload-schemas/api.github.com/common/deployment-workflow-run.schema.json b/payload-schemas/api.github.com/common/deployment-workflow-run.schema.json index e7ba9b1f3..8ce6e9522 100644 --- a/payload-schemas/api.github.com/common/deployment-workflow-run.schema.json +++ b/payload-schemas/api.github.com/common/deployment-workflow-run.schema.json @@ -65,7 +65,11 @@ "actor": { "$ref": "user.schema.json" }, "triggering_actor": { "$ref": "user.schema.json" }, "run_attempt": { "type": "integer" }, - "run_started_at": { "type": "string", "format": "date-time" } + "run_started_at": { "type": "string", "format": "date-time" }, + "referenced_workflows": { + "type": "array", + "items": { "$ref": "referenced-workflow.schema.json" } + } }, "additionalProperties": false, "title": "Deployment Workflow Run" diff --git a/payload-schemas/api.github.com/common/referenced-workflow.schema.json b/payload-schemas/api.github.com/common/referenced-workflow.schema.json new file mode 100644 index 000000000..bdff43624 --- /dev/null +++ b/payload-schemas/api.github.com/common/referenced-workflow.schema.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "common/referenced-workflow.schema.json", + "title": "Referenced workflow", + "description": "A workflow referenced/reused by the initial caller workflow", + "type": "object", + "properties": { + "path": { "type": "string" }, + "sha": { "type": "string" }, + "ref": { "type": "string" } + }, + "required": ["path", "sha"], + "additionalProperties": false +} diff --git a/payload-schemas/api.github.com/common/workflow-run.schema.json b/payload-schemas/api.github.com/common/workflow-run.schema.json index e1a25ecb4..e8a599ccd 100644 --- a/payload-schemas/api.github.com/common/workflow-run.schema.json +++ b/payload-schemas/api.github.com/common/workflow-run.schema.json @@ -114,6 +114,10 @@ "workflow_id": { "type": "integer" }, "workflow_url": { "type": "string", "format": "uri" }, "run_attempt": { "type": "integer" }, + "referenced_workflows": { + "type": "array", + "items": { "$ref": "referenced-workflow.schema.json" } + }, "run_started_at": { "type": "string", "format": "date-time" }, "previous_attempt_url": { "oneOf": [{ "type": "string", "format": "uri" }, { "type": "null" }]