use of org.eclipse.che.plugin.github.shared.GitHubPullRequestList in project che by eclipse.
the class GitHubDTOFactory method createPullRequestsList.
/**
* Create DTO object of GitHub pull-requests collection from given pull-request
* @param ghPullRequest pull-request from kohsuke GitHub library
* @return DTO object
* @throws IOException
*/
public GitHubPullRequestList createPullRequestsList(GHPullRequest ghPullRequest) throws IOException {
GitHubPullRequestList gitHubPullRequestList = DtoFactory.getInstance().createDto(GitHubPullRequestList.class);
List<GitHubPullRequest> dtoPullRequestsList = new ArrayList<>();
dtoPullRequestsList.add(createPullRequest(ghPullRequest));
gitHubPullRequestList.setPullRequests(dtoPullRequestsList);
return gitHubPullRequestList;
}
use of org.eclipse.che.plugin.github.shared.GitHubPullRequestList in project che by eclipse.
the class GitHubDTOFactory method createPullRequestsList.
/**
* Create DTO object of GitHub pull-requests collection from given pull-requests
* @param ghPullRequestsList collection of pull-requests from kohsuke GitHub library
* @return DTO object
* @throws IOException
*/
public GitHubPullRequestList createPullRequestsList(PagedIterable<GHPullRequest> ghPullRequestsList) throws IOException {
GitHubPullRequestList gitHubPullRequestList = DtoFactory.getInstance().createDto(GitHubPullRequestList.class);
List<GitHubPullRequest> dtoPullRequestsList = new ArrayList<>();
for (GHPullRequest ghPullRequest : ghPullRequestsList) {
dtoPullRequestsList.add(createPullRequest(ghPullRequest));
}
gitHubPullRequestList.setPullRequests(dtoPullRequestsList);
return gitHubPullRequestList;
}
Aggregations