How do I efficiently retrieve repos where I have contributed, but not owned by me? #151261
-
Select Topic AreaQuestion BodyI work in a large organization where we use GitHub. We would like to make an API call (REST or GraphQL) to GitHub to retrieve repos that are interesting to a specific logged in user - me for example. This could be repos that I have contributed to or repos that anyone in any of my teams have contributed to. Any one of these would be fine. We do have possible workarounds:
Surely there should be a way to do this in just one call. We have tried the following with the GraphQL API:
Someone has suggested we look into OctoKit's GraphQL library, which is what we will try next. We have looked at the REST API, but found only repo-by-repo possibilities. Is this at all possible to do in one API call? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Fetching User-Contributed Repositories in a Large OrganizationFetching all repositories a user has contributed to within a large organization in a single API call is quite challenging due to GitHub's current API limitations. However, here are some approaches that might help: 1. Using GraphQL API (Efficient Querying)GitHub's GraphQL API provides a way to query user contributions without looping over repositories manually. Using
|
Beta Was this translation helpful? Give feedback.
Fetching User-Contributed Repositories in a Large Organization
Fetching all repositories a user has contributed to within a large organization in a single API call is quite challenging due to GitHub's current API limitations. However, here are some approaches that might help:
1. Using GraphQL API (Efficient Querying)
GitHub's GraphQL API provides a way to query user contributions without looping over repositories manually.
Using
contributionsCollection
to Fetch Contributed ReposThe following query retrieves repositories where a user has made commit contributions: