Skip to content

Instantly share code, notes, and snippets.

@jd
Created August 19, 2014 14:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jd/20d2ffd4b1e6ce3a8b07 to your computer and use it in GitHub Desktop.
Save jd/20d2ffd4b1e6ce3a8b07 to your computer and use it in GitHub Desktop.
Starring all OpenStack Git repositories
!/usr/bin/env python
from github import Github
USERNAME = "myusername"
PASSWORD = "mypassword"
USERS = ("openstack", "stackforge", "openstack-dev", "openstack-infra")
g = Github(USERNAME, PASSWORD)
me = g.get_user()
for username in USERS:
user = g.get_user(username)
for repo in user.get_repos():
me.add_to_starred(repo)
print("Starred %s" % repo.full_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment