Skip to content

Instantly share code, notes, and snippets.

@alikrc
Created February 25, 2021 15:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alikrc/09ac914a32a5d088b0630eb34769c7d0 to your computer and use it in GitHub Desktop.
Save alikrc/09ac914a32a5d088b0630eb34769c7d0 to your computer and use it in GitHub Desktop.
import requests
# create your token with delete_repo scope
# https://github.com/settings/tokens/new
token = ""
userName = "alikrc"
repoName = ""
fullUrl = "https://api.github.com/repos/" + userName + "/" + repoName
r = requests.delete(fullUrl, auth=(userName, token))
print(r.status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment