private static async Task PredictLabelsAndUpdateGitHub(string ModelPath) { Console.WriteLine(".............Retrieving Issues from GITHUB repo, predicting label/s and assigning predicted label/s......"); var token = Configuration["GitHubToken"]; var repoOwner = Configuration["GitHubRepoOwner"]; //IMPORTANT: This can be a GitHub User or a GitHub Organization var repoName = Configuration["GitHubRepoName"]; if (string.IsNullOrEmpty(token) || token == "YOUR - GUID - GITHUB - TOKEN" || string.IsNullOrEmpty(repoOwner) || repoOwner == "YOUR-REPO-USER-OWNER-OR-ORGANIZATION" || string.IsNullOrEmpty(repoName) || repoName == "YOUR-REPO-SINGLE-NAME" ) { Console.Error.WriteLine(); Console.Error.WriteLine("Error: please configure the credentials in the appsettings.json file"); Console.ReadLine(); return; } //This "Labeler" class could be used in a different End-User application (Web app, other console app, desktop app, etc.) var labeler = new Labeler(ModelPath, repoOwner, repoName, token); await labeler.LabelAllNewIssuesInGitHubRepo(); Console.WriteLine("Labeling completed"); Console.ReadLine(); }
private static async Task PredictLabelsAndUpdateGitHub(string ModelPath) { var token = Configuration["GitHubToken"]; var repoOwner = Configuration["GitHubRepoOwner"]; //IMPORTANT: This can be a GitHub User or a GitHub Organization 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; } //This "Labeler" class could be used in a different End-User application (Web app, other console app, desktop app, etc.) var labeler = new Labeler(ModelPath, repoOwner, repoName, token); await labeler.LabelAllNewIssuesInGitHubRepo(); Console.WriteLine("Labeling completed"); Console.ReadLine(); }