Need Search criteria end point for github API

Hi Team, 

I am looking for the following criteria from GITHUB API. Can you please let me know which end points i need to use in order to get my search results

Given a user need List of all respository names sorted by No of open pull requests in desc order with pagination

Hi @udayaseetha,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now here in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.

Cheers!

Hi @udayaseetha,

You will probably need to use a combination of endpoints and external processing to get the report that you’re looking to generate.

To get a list of all repositories that a given user has explicit permission to access, you will want to use the List your repositories endpoint. This endpoint will give you a number of open issues, but not a number of open pull requests.

To get the number of open pull requests, you will want to go through each repository and use the List pull requests endpoint using “open” for the  state parameter.

You could also probably use the GitHub GraphQL API for this so that you’d only have to make one call, but that will take some experimentation to get exactly what you’re looking for.

Hope this helps!

Thank you. It helps.

In the Github API user guide it is mentioned that “Its not recommonded to generate urls try to get it from link header” . Is this true? If so i will be doing a sequential process to get results. Is there a way that i can get results parallelly?

Hi @shanti023213,

Using the GitHub API v3, you will need to access the endpoints sequentially as each endpoint is limited to a specific set of information.

Using the GitHub API v4 uses GraphQL, so it is possible to write a single call that will get you most if not all of what you need, but you will need to experiment with that to find the optimal way to get the results that you are looking for. If you need help with designing those calls, you may be interested in checking out the GitHub Platform Community which focuses on the API.

Thanks!