Skip to content

Instantly share code, notes, and snippets.

@jd
Created August 19, 2014 14:48
Show Gist options
  • Select an option

  • Save jd/20d2ffd4b1e6ce3a8b07 to your computer and use it in GitHub Desktop.

Select an option

Save jd/20d2ffd4b1e6ce3a8b07 to your computer and use it in GitHub Desktop.

Revisions

  1. jd renamed this gist Aug 19, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. jd created this gist Aug 19, 2014.
    15 changes: 15 additions & 0 deletions gistfile1.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    !/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)