octocrab icon indicating copy to clipboard operation
octocrab copied to clipboard

Add Search API

Open XAMPPRocky opened this issue 5 years ago • 6 comments

This is a tracking issue for the search API endpoints.

  • [x] Repositories
  • [x] Commits
  • [x] Code
  • [x] Issues and Pull Requests (closes #22)
  • [x] Users
  • [ ] Topics
  • [ ] Labels

XAMPPRocky avatar May 28 '20 21:05 XAMPPRocky

Hello, I was wondering if there was any update on this? I was wondering if topics would be implemented, or using the HTTP api of octocrab is the best route for now? Thanks!

kiwidoggie avatar Dec 27 '20 07:12 kiwidoggie

@kiwidoggie Thanks for your interest. It's not a priority for me at the moment, however I would be willing to accept a PR adding the function and model to octocrab.

XAMPPRocky avatar Dec 27 '20 14:12 XAMPPRocky

I tried the search commits API. There is an error related to deserialization caused by the author/committer fields in the Commit struct. Currently, GitUser is defined to be a struct with two fields name and email. But the JSON structure of the Github API response is different (see https://docs.github.com/en/rest/reference/search#search-users). So I have to comment out the author/committer fields as a workaround. To fix it, probably GitUser needs to be updated?

zhaogang92 avatar Apr 19 '21 06:04 zhaogang92

So I have to comment out the author/committer fields as a workaround. To fix it, probably GitUser needs to be updated?

Thank you, would you be able to make a PR that corrects it?

XAMPPRocky avatar Apr 19 '21 06:04 XAMPPRocky

Yeah, I can try to make a PR this weekend. Pretty busy recently.

zhaogang92 avatar Apr 20 '21 03:04 zhaogang92

@XAMPPRocky I'd be happy to work on the Labels API.

ghost avatar Apr 12 '22 16:04 ghost