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 · 5 comments
Closed

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

Simran-B opened this issue Oct 16, 2020 · 5 comments
Assignees
Labels
actions content triage

Comments

@Simran-B
Copy link
Contributor

@Simran-B Simran-B commented Oct 16, 2020

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/t/workflow-dispatch-cant-set-ref-to-commit-sha/138132

@github-actions github-actions bot added the triage label Oct 16, 2020
@github-actions github-actions bot added this to Triage in Docs open source board Oct 16, 2020
@janiceilene
Copy link
Collaborator

@janiceilene janiceilene commented Oct 19, 2020

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

@janiceilene janiceilene moved this from Triage to Ecosystem in Docs open source board Oct 19, 2020
@janiceilene janiceilene added actions content labels Oct 19, 2020
@tie
Copy link

@tie 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

@lucascosti lucascosti commented Oct 20, 2020

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

@lucascosti lucascosti commented Oct 21, 2020

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. 🚀

Docs open source board automation moved this from Ecosystem to Done Oct 22, 2020
@lucascosti
Copy link
Contributor

@lucascosti lucascosti commented Oct 22, 2020

Thanks all! This fix is now live 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions content triage
Development

No branches or pull requests

4 participants