Skip to content

Instantly share code, notes, and snippets.

@SamLR
Created August 29, 2019 10:15
Show Gist options
  • Save SamLR/c1b565aaee7333dd5ac5c1b6f1383613 to your computer and use it in GitHub Desktop.
Save SamLR/c1b565aaee7333dd5ac5c1b6f1383613 to your computer and use it in GitHub Desktop.
# Step 1
curl -v https://api.github.com/orgs/alphagov/repos
# Copy the 'rel="last"' value from this section
# < Link: <https://api.github.com/organizations/596977/repos?page=2>; rel="next", <https://api.github.com/organizations/596977/repos?page=44>; rel="last"
# i.e. '44'
for i in {1..44}; do curl "https://api.github.com/organizations/596977/repos?page=$i" >> repos.json; done
cat repos.json| jq '.[]|.html_url' -r | xargs -I REPO git clone REPO && sleep 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment