Created
November 19, 2020 17:55
-
-
Save robinbowes/0823e4172bca9126383eea285218aef5 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 | |
set -euo pipefail | |
page=1 | |
repo_list=() | |
while true ; do | |
output=$(hub api -XGET -F type=all -F page=$page -F per_page=100 /user/repos | jq -r '.[].full_name') | |
if [[ -n $output ]]; then | |
readarray -t chunk <<<"$output" | |
repo_list+=("${chunk[@]}") | |
else | |
break | |
fi | |
((page+=1)) | |
done | |
printf '%s\n' "${repo_list[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment