Closed
Description
follow up to https://github.com/octokit/rest.js/issues/1885 /cc @yfried
Schema Inaccuracy
The workflow_id
URL parameter is described as integer.
workflow-id:
name: workflow_id
in: path
required: true
schema:
type: integer
Expected
The description at https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event states
You can also replace
{workflow_id}
with the workflow file name. For example, you could use main.yml.
Which I understand means that workflow_id
can also be set to a string
Reproduction Steps
I tried to create an actions dispatch event using curl
and a workflow file name, but got a 404. Did miss something or are the docs incorrect?
curl -XPOST -H"Authorization: token [TOKEN]" https://api.github.com/repos/octokit/sandbox/actions/workflows/nodekitten.yml/dispatches -d '{"ref": "main"}'