Skip to content

Instantly share code, notes, and snippets.

@xabikos
Created March 11, 2016 19:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xabikos/f096062d932c80d0adda to your computer and use it in GitHub Desktop.
Save xabikos/f096062d932c80d0adda to your computer and use it in GitHub Desktop.
Delete all repositories for user through Octokit.net
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