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

Reference::Commit is based on a documentation error #608

Closed
flying-sheep opened this issue Mar 15, 2024 · 1 comment · Fixed by #697
Closed

Reference::Commit is based on a documentation error #608

flying-sheep opened this issue Mar 15, 2024 · 1 comment · Fixed by #697

Comments

@flying-sheep
Copy link
Contributor

See github/docs#31914

Despite GitHub’s failure to communicate how they resolved it, the documentation was changed from mentioning “commit sha” as a valid option for ref to not mentioning that, so I assume the only valid options are git refs (refs/heads/..., refs/tags/... and so on)

So I guess Reference::Commit should be deleted, as using it just gives you 404 errors.

@benpueschel
Copy link
Contributor

I was able to replicate this:

    let client = Octocrab::builder().personal_token(TOKEN).build().unwrap();
    let repo = client
        .repos("XAMPPRocky", "octocrab")
        .get_ref(&Reference::Commit(
            "3167540eb0997c998b8ce1cb9aa2fae742011fdf".to_string(),
        ))
        .await
        .expect("Commit reference not valid");

This returns a 404 error, even though the commit sha is valid. Given that the feature doesn't work anyway, this should be safe to remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants