Skip to content

Instantly share code, notes, and snippets.

@mausch
Created February 17, 2012 03:34
Show Gist options
  • Save mausch/1850364 to your computer and use it in GitHub Desktop.
Save mausch/1850364 to your computer and use it in GitHub Desktop.
Watches all repositories in a given github network
user="mausch"
token="your_github_token"
mainrepo="mausch/solrnet"
urls=$(curl -s "https://github.com/api/v2/json/repos/show/$mainrepo/network" | python -mjson.tool | grep "url" | grep -vi "$mainrepo" | sed -re 's/.*(https.*)".*/\1/')
for url in $urls; do
remote=$(echo $url | cut -d/ -f4-5)
curl -F "login=$user" -F "token=$token" "https://github.com/api/v2/json/repos/watch/$remote"
echo
done
@mausch
Copy link
Author

mausch commented Jul 7, 2012

This needs to be updated for GitHub API v3. Anyone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment