Skip to content

How do I efficiently retrieve repos where I have contributed, but not owned by me? #151261

Discussion options

You must be logged in to vote

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 Repos

The following query retrieves repositories where a user has made commit contributions:

{
  user(login: "YourGitHubUsername") {
    contributionsCollection {
      commitContributionsByRepository(maxRepositories: 100

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@halhag
Comment options

@victordami01
Comment options

@halhag
Comment options

Answer selected by halhag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API and Webhooks Discussions and conversations related to APIs or Webhooks Question
2 participants