Created
August 23, 2016 07:40
-
-
Save maxtortime/d31f97038fb58717b518b9afcee94000 to your computer and use it in GitHub Desktop.
Delete repository by github3.py api.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import github3 | |
gh = github3.login(token='your access token') | |
for repo in gh.iter_user_repos(login='maxtortime'): | |
choice = str(input(repo.name + ' ')) | |
if choice == 'd': | |
repo.delete() | |
else: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had to modify some to get it to work for me.
import github3
gh=github3.login(token='token')
for repo in gh.iter_user_repos(login='user'):
choice = raw_input("Select d to delete " + repo.name + " : " )
if choice != 'd':
continue
else:
print "Delete " + repo.name
repo.delete()