diff --git a/GithubIssueTagger/IssueUtilities.cs b/GithubIssueTagger/IssueUtilities.cs index 52857ae..bd7e92d 100644 --- a/GithubIssueTagger/IssueUtilities.cs +++ b/GithubIssueTagger/IssueUtilities.cs @@ -40,6 +40,23 @@ public static async Task> GetAllIssues(GitHubClient client, s return issuesForMilestone; } + public static async Task> GetOpenPriority1Issues(GitHubClient client, string org, string repo) + { + var nugetRepos = new RepositoryCollection(); + nugetRepos.Add(org, repo); + + var queryLabels = new string[] { "priority:1" }; + + var request = new SearchIssuesRequest() + { + Repos = nugetRepos, + State = ItemState.Open, + Labels = queryLabels + }; + var issuesForMilestone = await client.Search.SearchIssues(request); + return issuesForMilestone.Items; + } + /// /// Get all the issues considered unprocessed. This means that either the issue does not have any labels, or only has the pipeline labels. /// diff --git a/GithubIssueTagger/Program.cs b/GithubIssueTagger/Program.cs index 5bd6ace..41efd07 100644 --- a/GithubIssueTagger/Program.cs +++ b/GithubIssueTagger/Program.cs @@ -1,6 +1,8 @@ -using Octokit; +using Newtonsoft.Json; +using Octokit; using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading.Tasks; @@ -9,8 +11,10 @@ namespace GithubIssueTagger public class Program { private static IList _unprocessedIssues; - private static IReadOnlyList