Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Simran-B opened this issue Oct 16, 2020 · 6 comments
Closed
Assignees
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team triage Do not begin working on this issue until triaged by the team

Comments

@Simran-B
Copy link
Contributor

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.saobby.my.eu.orgmunity/t/workflow-dispatch-cant-set-ref-to-commit-sha/138132

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 16, 2020
@janiceilene
Copy link
Contributor

Thanks for the issue @Simran-B! I'll send this over to the ecosystem team to look at 👀

@janiceilene janiceilene added actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team labels Oct 19, 2020
@tie
Copy link

tie commented Oct 19, 2020

@janiceilene also it looks like it doesn’t accept PR refs like refs/pull/3/head.

@lucascosti
Copy link
Contributor

Thanks for opening this, @Simran-B! I'll try and confirm with the engineering team that the docs are incorrect and this isn't a product bug.

@lucascosti lucascosti self-assigned this Oct 20, 2020
@lucascosti
Copy link
Contributor

Ok, confirmed that SHA functionality is not implemented in the API at the moment. Because the source for the API docs is in a separate internal repo, I'll open a fix that will fix this issue. 🚀

@lucascosti
Copy link
Contributor

Thanks all! This fix is now live 🚀

@matfax
Copy link

matfax commented Nov 14, 2023

FYI, I've opened a discussion about this, since this fix only concerns the documentation, not the missing feature itself.

community#75513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team triage Do not begin working on this issue until triaged by the team
Projects
None yet
Development

No branches or pull requests

5 participants