Created
June 18, 2019 07:21
-
-
Save GhalyahFA/7aba04bdf07f0a53085cb90587d488cd to your computer and use it in GitHub Desktop.
python script to mass delete repos using github 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 requests | |
repo_names= [] | |
headers={"Authorization":"token YOURTOKEN"} | |
[repo_names.append("REPO_PREFIX"+ str(i)) for i in range(X,Y)] | |
for r in repo_names: | |
url= "https://api.github.com/repos/GhalyahF/"+r | |
r=requests.delete(url,headers=headers) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment