Skip to content

Commit

Permalink
Merge 68be760 into c3b4eb4
Browse files Browse the repository at this point in the history
  • Loading branch information
rladdusaw committed Dec 17, 2019
2 parents c3b4eb4 + 68be760 commit cf952e2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/edu/tamu/app/service/manager/GitHubService.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ private RemoteProject buildRemoteProject(GHRepository repo, List<GHLabel> labels
private int getPrimaryWorkItemCount(final String type, final GHProject project, final List<GHLabel> labels)
throws IOException {
label = getLabelByName(labels, type);
if (label == null) {
return 0;
}
return project.listColumns()
.asList()
.stream()
Expand Down Expand Up @@ -184,8 +187,11 @@ private long countCardsOnColumn(GHProjectColumn column) {

private boolean cardContainsLabel(GHProjectCard card) {
try {
return card.getContent().getLabels().contains(label);
} catch (IOException e) {
return card.getContent().getLabels().parallelStream()
.filter(cardLabel -> cardLabel.getName().equals(label.getName()))
.findAny()
.isPresent();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Expand Down

0 comments on commit cf952e2

Please sign in to comment.