static void Main(string[] args) { Predictor.Train(); // Consider only issues with ID older tham minId. To look at all issues in the repo, set minId = 1. const int minId = 1; var labeler = new Labeler(GitHubUserName, GitHubRepoName, GitHubToken); labeler.LabelAllNewIssues(minId); Console.WriteLine("Labeling completed"); Console.ReadLine(); }
private static async Task Label() { var token = ConfigurationManager.AppSettings["GitHubToken"]; var userName = ConfigurationManager.AppSettings["GitHubUserName"]; var repoName = ConfigurationManager.AppSettings["GitHubRepositoryName"]; if (string.IsNullOrEmpty(token) || string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(repoName)) { Console.Error.WriteLine("error: please configure the credentials in the app.config"); return; } var labeler = new Labeler(userName, repoName, token); await labeler.LabelAllNewIssues(); Console.WriteLine("Labeling completed"); }
private static async Task Label() { var token = Configuration["GitHubToken"]; var repoOwner = Configuration["GitHubRepoOwner"]; var repoName = Configuration["GitHubRepoName"]; if (string.IsNullOrEmpty(token) || string.IsNullOrEmpty(repoOwner) || string.IsNullOrEmpty(repoName)) { Console.Error.WriteLine(); Console.Error.WriteLine("Error: please configure the credentials in the appsettings.json file"); Console.ReadLine(); return; } var labeler = new Labeler(repoOwner, repoName, token); await labeler.LabelAllNewIssues(); Console.WriteLine("Labeling completed"); Console.ReadLine(); }