Last active
February 12, 2017 01:55
-
-
Save marianogappa/4ea4164608325faef7042ece4ae348ee to your computer and use it in GitHub Desktop.
Ranking of GH repos per stargazers on your organisation
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
# (requires jq) | |
# USER=your_github_username | |
# ACCESS_TOKEN=your_github_access_token | |
# ORGANIZATION=your_organization | |
curl -u $USER:$ACCESS_TOKEN -s "https://api.github.com/orgs/$ORGANIZATION/members?per_page=100" | \ | |
jq -r '.[] | "\(.repos_url)?per_page=100"' | \ | |
while read line; do echo -n "$(curl -s $line | jq --raw-output '.[] | {a:.stargazers_count,b:.full_name} | .[] ' | paste -s -d ' \n' - )"; done | \ | |
sort -rn | grep -v '^0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment