Reputation: 3371
I am trying to build a program that fetches the releases for every repository within an org. There could be one, a few, or a lot of repos within the org. What is the best way to achieve this through the GitHub API?
I see that individual repos have a releases API (https://api.github.com/repos/:org/:repo/releases), but I would like to be able to retrieve a consolidated list for the entire org.
Is it possible to do this in one request, or do I need to first fetch all repos for the org (https://api.github.com/orgs/:org/repos), and then run a batch of requests against each repo?
Upvotes: 1
Views: 266
Reputation: 1323363
Is it possible to do this in one request, or do I need to first fetch all repos for the org (https://api.github.com/orgs/:org/repos), and then run a batch of requests against each repo?
The latter (and you have to deal with pagination, if there are too many repos in an org)
I mentioned before GraphQL (to be able to do your query in one operation), but it is still an early access preview.
Upvotes: 1