Ejemplo n.º 1
0
        private void bitGetIssuesButton_Click(object sender, RoutedEventArgs e)
        {
            BitBucketRest bit = new BitBucketRest(bitUsername.Text,bitPassword.Password);
            string cnt = string.Empty;
            BitIssues = bit.GetIssues(selectedBitRepository,out cnt);

            #if DEBUG
            logger.AppendText("raw response: " + cnt);
            #endif

            foreach (Git2Bit.BitModels.Issue issue in BitIssues)
            {
                    logger.AppendText("Issue: " + issue.content.ToString() + Environment.NewLine);
            }
        }
Ejemplo n.º 2
0
        private void bitGetIssuesButton_Click(object sender, RoutedEventArgs e)
        {
            BitBucketRest bit = new BitBucketRest(bitUsername.Text,bitPassword.Password);
            bitComments = new Dictionary<int, List<BitModels.Comments>>();
            // Get the Bit Milestones
            bitMilestones = bit.GetMilestones(selectedBitRepository);
            if (bitMilestones == null)
            {
                logger.AppendText("The " + selectedBitRepository + " has no milestones.\n");

            }
            else
            {
                logger.AppendText("The " + selectedBitRepository + " has " + bitMilestones.Count.ToString() + " milestones.\n");

            }
            bitIssues = bit.GetIssues(selectedBitRepository);
            while (bit._hasMoreIssues)
            {
                bitIssues.Concat(bit.GetIssues(selectedBitRepository));
            }
            logger.AppendText("The " + selectedBitRepository + " has " + bitIssues.Count.ToString() + " issues.\n");
            // Get individual Comments for each issue
            foreach (Git2Bit.BitModels.Issue issue in bitIssues)
            {
                if (issue.comment_count > 0)
                {
                    // has comments:
                    List<Git2Bit.BitModels.Comments> comments = bit.GetComments(selectedBitRepository, issue.local_id);
                    logger.AppendText("Issue " + issue.local_id.ToString() + " has " + comments.Count.ToString() + " comments.\n");
                    bitComments[issue.local_id] = comments;
                }
            }
            bitGetIssuesButton.IsEnabled = false;
        }