1

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.