Skip to content

Actions: Workflow dispatch API does not accept SHA commit hash as ref #590

Description

@Simran-B

What article on docs.github.com is affected?

https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#create-a-workflow-dispatch-event

What part(s) of the article would you like to see updated?

According to the docs, POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches accepts a commit hash as reference:

Name Type In Description
ref string body Required. The reference of the workflow run. The reference can be a branch, tag, or a commit SHA.

This isn't the case:

{
  "message": "No ref found for: {hash}",
  "documentation_url": "https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event"
}

Only branch and tag names are accepted. Or is there an undocumented key or syntax for the value to reference a commit hash?

Additional information

https://github-community.bar.bot.cd/t/workflow-dispatch-cant-set-ref-to-commit-sha/138132

Metadata

Metadata

Assignees

Labels

actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamtriageDo not begin working on this issue until triaged by the team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions