-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Improve Commits API #398
Comments
Thank you for your issue! Yes adding that API would be appreciated. As for where it should go, I would look up the octokit JS API and see where they put it |
Understood! I'll fork the repo and get started on it. |
It looks like |
Ah yeah, I think it should go under commits, ultimately it’s very similar to repos because it does require you to specify a repo. |
Add `get` method to `CommitHandler`. This appears to more reliably return `Some` for optional response fields such as `files` and `stats`. See https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#get-a-commit
* Add get commit API (#398) Add `get` method to `CommitHandler`. This appears to more reliably return `Some` for optional response fields such as `files` and `stats`. See https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#get-a-commit * Format commit method and example (#398)
So, I spent a few hours yesterday figuring out why the Reading this issue, am I correct that some (all?) of the optional fields in That's good to know. Is this documented somewhere, and I just missed that detail? |
I just verified that this is indeed the case using:
Without |
I don't know if it's documented anywhere in the GitHub API, but we should probably add a note to the list method stating it. |
After some research, a possible solution to a discussion I started (link) is to list commits and send a get request for each one in order to get its
additions
anddeletions
. It looks like the only way to make this request is withoctocrab::Octocrab::get
. Would you be open to a PR that adds the "Get a commit" API (link)? It looks like the natural place to add it would beoctocrab::commits::CommitHandler::get
. Maybe it would also be useful to have a method foroctocrab::commits::CommitHandler::list -> octocrab::commits::ListCommitsBuilder
as well?The text was updated successfully, but these errors were encountered: