Skip to content

Instantly share code, notes, and snippets.

@micahhausler
Last active September 21, 2023 07:27
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save micahhausler/3448bb16b6d996efd783282c5918b98d to your computer and use it in GitHub Desktop.
Save micahhausler/3448bb16b6d996efd783282c5918b98d to your computer and use it in GitHub Desktop.
GitHub collaborator finder
# Go to https://developer.github.com/v4/explorer/ and enter the graphql query with the query veriable:
# {"queryString": "your-githubuser-name"}
cat results.json |
jq '.data.user.repositories.edges[] | { Count: .node.collaborators.totalCount, Repo: .node.name} | select(.Count > 2)'
query listCollaborators($queryString: String!) {
rateLimit {
cost
remaining
resetAt
}
user(login: $queryString) {
name
repositories(first: 100, orderBy: {field: NAME, direction: ASC}) {
edges {
node {
name
collaborators(first: 10, affiliation: ALL) {
totalCount
}
}
}
}
}
}
@donatj
Copy link

donatj commented Jan 8, 2019

I'm not sure if this is intended but this will find repo's that are at exactly 3, which is allowed on the free plan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment