mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
11 lines
403 B
Bash
Executable file
11 lines
403 B
Bash
Executable file
#!/usr/bin/env zsh
|
|
|
|
ORG="$1"
|
|
USRNAME="$2"
|
|
TOKEN="$3"
|
|
|
|
for url in $(curl -Lf "https://api.github.com/orgs/$ORG/repos?per_page=1000" | jq -r '.[].html_url' | sort -u); do
|
|
read repo <<< $(awk -F, -v url="$url" '{split($url,a,"/"); print a[5]}' <<<$url)
|
|
echo "$ORG/$repo"
|
|
curl -X PUT -H "Accept: application/vnd.github.v3+json" -u $USRNAME:$TOKEN "https://api.github.com/user/starred/$ORG/$repo"
|
|
done
|