private void minerIssues(List<Issue> gitIssues, Repository gitRepo) throws Exception {
EntityRepository repository = dao.findByID(repositoryToMinerId, EntityRepository.class);
int i = 0;
calculeSubProgress(i, gitIssues.size());
while (!canceled && i < gitIssues.size()) {
Issue gitIssue = gitIssues.get(i);
EntityIssue issue = minerIssue(gitIssue, repository);
if (minerEventsOfIssues) {
minerEventsIssue(issue, gitRepo);
}
if (minerCommentsOfIssues && issue.getCommentsCount() > issue.getComments().size()) {
minerCommentsOfIssue(issue, gitRepo);
}
EntityPullRequest pull = PullRequestServices.getPullRequestByNumber(gitIssue.getNumber(), repository, dao);
if (pull != null) {
pull.setIssue(issue);
issue.setPullRequest(pull);
dao.edit(pull);
}