Exemple #1
0
        static int Main(string[] args)
        {
            var options = new Options();
            if (!CommandLine.Parser.Default.ParseArguments(args, options))
            {
                Console.WriteLine(options.GetUsage());
                return -1;
            }

            AsyncContext.Run(() => MainAsync(options));

            //Console.WriteLine("*** Press ENTER to Exit ***");
            //Console.ReadLine();
            return 0;
        }
Exemple #2
0
        static async void MainAsync(Options options)
        {
            var github = new GitHubApi(options.Organization, options.Repository);
            
            var milestones = await github.GetAllMilestones();
            var issues = await github.GetClosedIssues();

            //var noMilestoneIssues = from i in issues where i.Milestone == null select i;
            //DisplayIssuesForMilestone("Issues with no milestone", noMilestoneIssues);

            foreach (var milestone in milestones.Where(m => m.State == ItemState.Open))
            {
                var milestoneIssues = from i in issues where i.Milestone != null && i.Milestone.Number == milestone.Number select i;
                DisplayIssuesForMilestone(milestone.Title, milestoneIssues);
            }
        }