}
public static List<PullRequest> getGitPullRequestsFromRepository(Repository gitRepo, boolean open, boolean closed, OutLog out) {
List<PullRequest> pulls = new ArrayList<PullRequest>();
try {
PullRequestService pullServ = new PullRequestService(AuthServices.getGitHubClient());
if (open) {
List<PullRequest> opensPulls;
out.printLog("Baixando PullRequests Abertos...\n");
opensPulls = pullServ.getPullRequests(gitRepo, "open");
out.printLog(opensPulls.size() + " PullRequests abertos baixados!");
pulls.addAll(opensPulls);
}
if (closed) {
List<PullRequest> closedsPulls;
out.printLog("Baixando PullRequests Fechados...\n");
closedsPulls = pullServ.getPullRequests(gitRepo, "closed");
out.printLog(closedsPulls.size() + " PullRequests fechados baixados!");
pulls.addAll(closedsPulls);
}
out.printLog(pulls.size() + " PullRequests baixados no total!");
} catch (Exception ex) {