Skip to content

[Schema Inaccuracy] Incorrect type for workflow_id #41

Closed
@gr2m

Description

@gr2m

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"}'  

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions