Created
January 29, 2018 04:48
-
-
Save Cyberboss/383453fb0d4cea313460692ea9aa6eb2 to your computer and use it in GitHub Desktop.
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
using Octokit; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Threading.Tasks; | |
namespace ShutDownEverything | |
{ | |
static class Program | |
{ | |
const string APIKey = "HAHAH NO NOT THIS TIME FUCK YOU"; | |
const string RepoOwner = "tgstation"; | |
const string RepoName = "tgstation"; | |
static async Task Main() | |
{ | |
var client = new GitHubClient(new ProductHeaderValue(Assembly.GetExecutingAssembly().GetName().Name)) | |
{ | |
Credentials = new Credentials(APIKey) | |
}; | |
var tasks = new List<Task>(); | |
foreach (var I in await client.PullRequest.GetAllForRepository(RepoOwner, RepoName, new PullRequestRequest { State = ItemStateFilter.Open })) | |
tasks.Add(client.PullRequest.Update(RepoOwner, RepoName, I.Number, new PullRequestUpdate { State = ItemState.Closed })); | |
await Task.WhenAll(tasks); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment