private void AddIssueToAssociatedPackage(IEnumerable<GlimpsePackage> packages, GithubIssue issue)
        {
            var labels = issue.Labels.Select(l => l.Name).ToList();

            var glimpsePackageIssues = from label in labels 
                                       from package in packages 
                                       from tag in package.Tags
                                       where tag.ToLower() == label.ToLower() 
                                       select package;
            foreach (var package in glimpsePackageIssues)
            {
                package.AddIssue(issue);
            }
        }
 public void AddIssue(GithubIssue issue)
 {
     if(!Issues.Contains(issue))
         Issues.Add(issue);
 }
Example #3
0
 protected bool Equals(GithubIssue other)
 {
     return string.Equals(Id, other.Id);
 }
 private IssueViewModel ConvertToIssueViewModel(GithubIssue openIssue)
 {
     var issueView = new IssueViewModel();
     issueView.IssueId = openIssue.Id;
     issueView.Number = openIssue.Number;
     issueView.IssueLinkUrl = openIssue.Html_Url;
     foreach (var label in openIssue.Labels)
     {
         if (!_packageTags.Contains(label.Name))
             issueView.Category += label.Name + ",";
     }
     RemoveLastComma(issueView);
     issueView.Description = openIssue.Title;
     issueView.User = openIssue.User;
     return issueView;
 }