[scripts] Add some of the legacy scripts

This commit is contained in:
Alyxia Sother 2022-02-07 00:32:28 +01:00
parent aeeda91fe7
commit bb53d01244
No known key found for this signature in database
GPG key ID: 355968D14144B739
4 changed files with 94 additions and 0 deletions

11
scripts/starall Executable file
View file

@ -0,0 +1,11 @@
#!/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