You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
“get a reference” API does not accept SHAs as documented (/repos/{owner}/{repo}/git/ref/{ref}) #31914
The commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME). For more information, see "Git References" in the Git documentation.
(emphasis mine)
Yet the ref API responds with 404 when used with a (valid) commit SHA:
$ gh api repos/scverse/anndata/git/ref/a4786471ee4d4e894fec150e426c3551db0f31e0gh: Not Found (HTTP 404){ "message": "Not Found", "documentation_url": "https://docs.github.com/rest/git/refs#get-a-reference"}
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
Thank you for opening this issue! Updates to this documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.
The :ref in the URL must be formatted as heads/ for branches and tags/ for tags. If the :ref doesn't match an existing ref, a 404 is returned.
So I think that the SHA is not accepted. I'll open an internal issue to move that info into the ref parameter description to make it more discoverable.
Thank you! I think the endpoint description you quote stayed the same, but the parameter description already changed since I filed this:
ref string Required
-The commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME).+The Git reference.
For more information, see "Git References" in the Git documentation.
I opened this initially since I read both endpoint and parameter descriptions and found them at odds. I also used a third party GitHub API client that followed the parameter docs and offered an abstraction for the commit case.
I’m just confused why there’s nobody from GitHub responding in this thread confirming that the change in the docs means that it was a mistake that one option for “ref” was a commit SHA. I guess it’s safe to infer that it is, but it would be nice to have feedback in a public issue 😄
Activity
welcome commentedon Mar 1, 2024
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
nguyenalex836 commentedon Mar 1, 2024
@flying-sheep Thanks for opening this issue! I'll get this triaged for review ✨
docs-bot commentedon Mar 4, 2024
Thank you for opening this issue! Updates to this documentation must be made internally. I have copied your issue to an internal issue, so I will close this issue.
flying-sheep commentedon Mar 5, 2024
What will the fix be? Will the definition of the
refparameter change or the behavior of the API? Where can I track this?lsdm83114 commentedon Mar 5, 2024
lsdm83114 commentedon Mar 5, 2024
flying-sheep commentedon Mar 15, 2024
The documentation now reads
So I assume that means “commit sha” isn’t supposed to be a valid option?
Can you please clarify what the resolution here is?
skedwards88 commentedon Mar 15, 2024
The description for that endpoint says
So I think that the SHA is not accepted. I'll open an internal issue to move that info into the
refparameter description to make it more discoverable.flying-sheep commentedon Mar 16, 2024
Thank you! I think the endpoint description you quote stayed the same, but the parameter description already changed since I filed this:
I opened this initially since I read both endpoint and parameter descriptions and found them at odds. I also used a third party GitHub API client that followed the parameter docs and offered an abstraction for the commit case.
I’m just confused why there’s nobody from GitHub responding in this thread confirming that the change in the docs means that it was a mistake that one option for “ref” was a commit SHA. I guess it’s safe to infer that it is, but it would be nice to have feedback in a public issue 😄