Skip to content

Commit bf5b8e5

Browse files
committed
trigger-workflow-dispatch: drop obsolete return_run_details attribute
This used to be needed to get _some_ information back, but now it no longer works: "return_run_details" is not an object Seems that the newest API version silently dropped this flag. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent a97eec5 commit bf5b8e5

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎GitGitGadget/trigger-workflow-dispatch.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const triggerWorkflowDispatch = async (context, token, owner, repo, workflow_id,
4949
token,
5050
'POST',
5151
`/repos/${owner}/${repo}/actions/workflows/${workflow_id}/dispatches`,
52-
{ ref, inputs, return_run_details: true }
52+
{ ref, inputs }
5353
)
5454

5555
if (response.workflow_run_id) return response

‎__tests__/trigger-workflow-dispatch.test.js‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ test('use workflow run details returned by the dispatch', async () => {
6565
expect(mockHTTPSRequest).toHaveBeenCalledTimes(1)
6666
expect(mockHTTPSRequest.mock.calls[0][4]).toEqual({
6767
ref: 'HEAD',
68-
inputs: { abc: 123 },
69-
return_run_details: true
68+
inputs: { abc: 123 }
7069
})
7170
})
7271

@@ -79,13 +78,12 @@ test('fall back to waiting for the workflow run', async () => {
7978
})
8079
expect(mockHTTPSRequest.mock.calls[0][4]).toEqual({
8180
ref: 'HEAD',
82-
inputs: { abc: 123 },
83-
return_run_details: true
81+
inputs: { abc: 123 }
8482
})
8583
})
8684

8785
test('list workflow runs', async () => {
8886
const context = {}
8987
const runs = await listWorkflowRuns(context, 'my-token', 'hello', 'world', 'the-workflow.yml', 'main', 'queued')
9088
expect(runs.length).toEqual(2)
91-
})
89+
})

0 commit comments

Comments
 (0)