Last active
September 21, 2023 07:27
-
-
Save micahhausler/3448bb16b6d996efd783282c5918b98d to your computer and use it in GitHub Desktop.
GitHub collaborator finder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.