Created
November 29, 2018 02:10
-
-
Save SanCoder-Q/e96eb939a3bea2ceff3aeb411fcf5414 to your computer and use it in GitHub Desktop.
Tricks using github API
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
git_auth_token='' | |
git_domain='' | |
org_name='' | |
# Clone all | |
curl "https://api.${git_domain}/${org_name}/<>/repos" -H "Authorization: token ${git_auth_token}" |\ | |
jq -r .[].subscription_url |\ | |
xargs -n1 -Ix git clone x | |
# Watch all | |
curl "https://api.${git_domain}/${org_name}/<>/repos" -H "Authorization: token ${git_auth_token}" |\ | |
jq -r .[].subscription_url |\ | |
xargs -n1 -I@ curl -XPUT @ -H "Authorization: token ${git_auth_token}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment