Last active
January 28, 2021 02:08
-
-
Save justanotherdot/d205322999a44f997cdc6550b065c6ef to your computer and use it in GitHub Desktop.
Clone all repos for an org via the gh tool.
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
: {org:?"need to set an org name"} | |
: {max_pages:?"need to set maximum number of pages"} | |
for PAGE in $( seq $max_pages ); do | |
gh api ‘orgs/$org/repos?per_page=100&page=‘“$PAGE” | jq -r ‘map(.name) | .[]' | while read NAME; do | |
git clone “[email protected]:$org/$NAME” | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment