Created
August 14, 2022 16:14
-
-
Save Ran-Xing/c48e28e931a6c581973a0bb9f3f252aa to your computer and use it in GitHub Desktop.
Batch modify github code
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
TOKEN="ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
USER_NAME="Ran-Xing" | |
jq '.[].ssh_url' <(curl \ | |
-s \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: token $TOKEN" \ | |
"https://api.github.com/users/$USER_NAME/repos?type=all&sort=&direction=&per_page=100&page=") \ | |
| grep $USER_NAME | |
ORG="XRSec" | |
jq '.[].ssh_url' <(curl \ | |
-s \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: token $TOKEN" \ | |
"https://api.github.com/orgs/${ORG}/repos?type=all&sort=&direction=&per_page=100&page=") \ | |
| grep $ORG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment