class TakeSnapshotTask implements Callable<Snapshot> {

    Collection<Project> collectProjects(OrganizationWrapper organization) throws IOException, URISyntaxException {
        logger.info("Started collecting projects for organization '{}'.", organisationName);

        List<Project> projects = new ArrayList<>();

        for (RepositoryWrapper repository : organization.listRepositories()) {
            Project project = new Project();

            project.setGitHubProjectId(repository.getId());
            project.setSnapshotDate(snapshotDate);
            project.setName(repository.getName());
            project.setUrl(repository.getUrl().toURI().toString());
            project.setDescription(repository.getDescription());
            project.setStarsCount(repository.getStarsCount());
            project.setForksCount(repository.getForksCount());
            project.setLastPushed(repository.getLastPushed().toString());
            project.setPrimaryLanguage(repository.getPrimaryLanguage());
            project.setLanguageList(new ArrayList<>(repository.listLanguages().keySet()));
            project.setOrganizationName(organization.getLogin());
            project.setCommitsCount(repository.listCommits().size());
            project.setContributorsCount(repository.listContributors().size());
            project.setExternalContributorsCount((int) repository.listContributors().stream()
                    .filter(contributor -> !organization.contributorIsMember(contributor))
                    .map(GHRepository.Contributor::getId)
                    .distinct()
                    .count());
            project.setScore(scorer.score(project));

            project.setMaintainers(getProjectMaintainers(repository));

            readCatwatchYaml(repository, project);

            projects.add(project);
        }

        logger.info("Finished collecting projects for organization '{}'.", organisationName);

        return projects;
    }

    public  TakeSnapshotTask(final GitHub gitHub, final String organisationName, Scorer scorer, Date snapshotDate);

}