Search in sources :

Example 1 with LabelsItem

use of com.checkmarx.flow.dto.github.LabelsItem in project cx-flow by checkmarx-ltd.

the class GitHubIssueTracker method mapToIssue.

private Issue mapToIssue(com.checkmarx.flow.dto.github.Issue issue) {
    if (issue == null) {
        return null;
    }
    Issue i = new Issue();
    i.setBody(issue.getBody());
    i.setTitle(issue.getTitle());
    i.setId(String.valueOf(issue.getId()));
    List<String> labels = new ArrayList<>();
    for (LabelsItem l : issue.getLabels()) {
        labels.add(l.getName());
    }
    i.setLabels(labels);
    i.setUrl(issue.getUrl());
    i.setState(issue.getState());
    return i;
}
Also used : Issue(com.checkmarx.flow.dto.Issue) LabelsItem(com.checkmarx.flow.dto.github.LabelsItem) ArrayList(java.util.ArrayList)

Aggregations

Issue (com.checkmarx.flow.dto.Issue)1 LabelsItem (com.checkmarx.flow.dto.github.LabelsItem)1 ArrayList (java.util.ArrayList)1