Last active
December 5, 2022 17:47
-
-
Save debo/c1fd192778c634055f8c29105072d0a3 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
GITHUB_BASE_URL="https://api.github.com" | |
GITHUB_ORGANIZATION="${PWD##*/}" | |
GITHUB_API_TOKEN="" | |
for repo in `curl -H "Authorization: Bearer $GITHUB_API_TOKEN" "$GITHUB_BASE_URL/orgs/$GITHUB_ORGANIZATION/repos?per_page=100" | jq '.[] | select( .archived == false ) | .ssh_url' | sed 's/"//g' | sed 's/null//g' | sed '/^\s*$/d' | sort`; do | |
git clone $repo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment