private bool IssueBelongsToTeam(TeamInfo team, Issue issue) { if (team.AreaLabels != null && !issue.Labels.Any(lbl => team.AreaLabels.Contains(lbl.Name))) { return(false); } IEnumerable <string> membersToIncludeInReport = team.GetMembersToIncludeInReport(); return(issue.Assignee == null || membersToIncludeInReport.Any(memberName => String.Equals(memberName, issue.Assignee.Login, StringComparison.OrdinalIgnoreCase))); }