def remove_repository(project_language, project_name): try: repo_name = "{0}/{1}-{2}".format(Credentials.username, project_language, project_name) repo = Github(login_or_token=Credentials.git_token).get_repo(repo_name) repo.delete() print("Repository {0}-{1} deleted successfully".format(project_language, project_name)) except Exception as error: print("Error occured during deleting repository: {0}".format(error))
def remove(): repo_name = str(sys.argv[1]) # Get user repo = Github(USERNAME, PASSWORD).get_user().get_repo(repo_name) repo.delete() print("Succesfully deleted repository {}".format(repo_name))