Skip to content

Commit

Permalink
Also add vscode-csharp to the list of repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmalinowski committed Feb 8, 2024
1 parent ad6bbac commit c0ab9d4
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,17 @@ void AddToCategory(string category, PullRequest pullRequest)

private static async Task<ImmutableArray<PullRequest>> GetAllPullRequests(GitHubClient github)
{
var format = github.PullRequest.GetAllForRepository("dotnet", "format", new ApiOptions { PageSize = 100 });
var roslyn = github.PullRequest.GetAllForRepository("dotnet", "roslyn", new ApiOptions { PageSize = 100 });
var roslynAnalyzers = github.PullRequest.GetAllForRepository("dotnet", "roslyn-analyzers", new ApiOptions { PageSize = 100 });
var roslynSdk = github.PullRequest.GetAllForRepository("dotnet", "roslyn-sdk", new ApiOptions { PageSize = 100 });
var roslynTools = github.PullRequest.GetAllForRepository("dotnet", "roslyn-tools", new ApiOptions { PageSize = 100 });
(string org, string name)[] repositories = [
("dotnet", "format"),
("dotnet", "roslyn"),
("dotnet", "roslyn-analyzers"),
("dotnet", "roslyn-sdk"),
("dotnet", "roslyn-tools"),
("dotnet", "vscode-csharp"),
];

var allPullRequests = await Task.WhenAll(format, roslyn, roslynAnalyzers, roslynSdk, roslynTools);
var tasks = repositories.Select(repo => github.PullRequest.GetAllForRepository(repo.org, repo.name, new ApiOptions { PageSize = 100 }));
var allPullRequests = await Task.WhenAll(tasks);

return allPullRequests.SelectMany(prs => prs).OrderByDescending(pr => pr.CreatedAt).ToImmutableArray();
}
Expand Down

0 comments on commit c0ab9d4

Please sign in to comment.