Skip to content

Instantly share code, notes, and snippets.

@andymckay
Last active October 8, 2022 20:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andymckay/2869c45c8ab4b5d7579e4b923c764ffd to your computer and use it in GitHub Desktop.
Save andymckay/2869c45c8ab4b5d7579e4b923c764ffd to your computer and use it in GitHub Desktop.
from github import Github
import os
g = Github(os.getenv("GITHUB_TOKEN"))
u = g.get_user("....")
for repo in u.get_repos():
print(repo.html_url)
value = input("Delete y/n?")
if value.lower() == "y":
print("Deleting: {}".format(repo.html_url))
repo.delete()
else:
print("..next")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment