Last active
July 14, 2022 01:46
-
-
Save brasic/14222db7b3f5873b84820477cca27019 to your computer and use it in GitHub Desktop.
all_repos_graphql.sh
This file contains hidden or 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
gh api graphql --paginate -f query=' | |
query($endCursor: String) { | |
organization(login: "rails") { | |
repositories(first: 10, after: $endCursor, | |
orderBy: { field: STARGAZERS, direction: DESC } | |
) { | |
nodes { | |
url | |
stargazers { | |
totalCount | |
} | |
} | |
pageInfo { endCursor hasNextPage } # needed for auto-pagination | |
} | |
} | |
}' -q '.data.organization.repositories.nodes.[]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment