Skip to content

Commit 81ac42e

Browse files
chore: include workflow inputs in job get endpoint (#1162)
1 parent 5e617b8 commit 81ac42e

5 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎apps/api/openapi/openapi.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,11 @@
10191019
"environment": {
10201020
"$ref": "#/components/schemas/Environment"
10211021
},
1022+
"inputs": {
1023+
"additionalProperties": true,
1024+
"description": "Resolved input values for a workflow run.",
1025+
"type": "object"
1026+
},
10221027
"jobAgent": {
10231028
"$ref": "#/components/schemas/JobAgent"
10241029
},

‎apps/api/openapi/schemas/jobs.jsonnet‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ local JobPropertyKeys = std.objectFields(Job.properties);
7777
workflowJob: openapi.schemaRef('WorkflowJob'),
7878
workflowRun: openapi.schemaRef('WorkflowRun'),
7979
version: openapi.schemaRef('DeploymentVersion'),
80+
inputs: {
81+
type: 'object',
82+
additionalProperties: true,
83+
description: 'Resolved input values for a workflow run.',
84+
},
8085
variables: {
8186
type: 'object',
8287
additionalProperties: openapi.schemaRef('LiteralValue'),

‎apps/api/src/types/openapi.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,10 @@ export interface components {
15831583
DispatchContext: {
15841584
deployment?: components["schemas"]["Deployment"];
15851585
environment?: components["schemas"]["Environment"];
1586+
/** @description Resolved input values for a workflow run. */
1587+
inputs?: {
1588+
[key: string]: unknown;
1589+
};
15861590
jobAgent: components["schemas"]["JobAgent"];
15871591
jobAgentConfig: components["schemas"]["JobAgentConfig"];
15881592
release?: components["schemas"]["Release"];

‎github/get-job-inputs/index.js‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎integrations/github-get-job-inputs/src/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ async function run() {
8383
workspace: { id: job.workspaceId },
8484
environment: dispatchContext?.environment,
8585
deployment: dispatchContext?.deployment,
86+
input: dispatchContext?.inputs,
8687
};
8788

8889
setOutputsRecursively(null, ghActionsJobObject);

0 commit comments

Comments
 (0)