Created
March 11, 2016 19:20
-
-
Save xabikos/f096062d932c80d0adda to your computer and use it in GitHub Desktop.
Delete all repositories for user through Octokit.net
This file contains 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
static async Task Execute() { | |
var client = new GitHubClient(new ProductHeaderValue("my-cool-app")); | |
var basicAuth = new Credentials("githubusername", "githubpassword"); // NOTE: not real credentials | |
client.Credentials = basicAuth; | |
var repos = await client.Repository.GetAllForUser("githubusername"); | |
var tasks = repos.Select(repo => client.Repository.Delete("githubusername", repo.Name)); | |
Task.WaitAll(tasks.ToArray()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment