class All implements ExecutableWithNamespace {

    protected void forkRepositoriesFound(Multimap<String, String> pathToDockerfilesInParentRepo,
                                         Multimap<String, String> imagesFoundInParentRepo,
                                         PagedSearchIterable<GHContent> contentsWithImage,
                                         String image) throws IOException {
        log.info("Forking {} repositories...", contentsWithImage.getTotalCount());
        List<String> parentReposForked = new ArrayList<>();
        GHRepository parent;
        String parentRepoName = null;
        for (GHContent c : contentsWithImage) {
            /* Kohsuke's GitHub API library, when retrieving the forked repository, looks at the name of the parent to
             * retrieve. The issue with that is: GitHub, when forking two or more repositories with the same name,
             * automatically fixes the names to be unique (by appending "-#" to the end). Because of this edge case, we
             * cannot save the forks and iterate over the repositories; else, we end up missing/not updating the
             * repositories that were automatically fixed by GitHub. Instead, we save the names of the parent repos
             * in the map above, find the list of repositories under the authorized user, and iterate through that list.
             */
            parent = c.getOwner();
            parentRepoName = parent.getFullName();
            if (parent.isFork()) {
                log.warn("Skipping {} because it's a fork already. Sending a PR to a fork is unsupported at the moment.",
                        parentRepoName);
            } else {
                // fork the parent if not already forked
                if (!parentReposForked.contains(parentRepoName)) {
                    // TODO: Need to close PR!
                    GHRepository fork = dockerfileGitHubUtil.getOrCreateFork(parent);
                    GHPullRequest pr = getPullRequestWithPullReqIdentifier(parent);
                    // Only reason we close the existing PR, delete fork and re-fork, is because there is no way to
                    // determine if the existing fork is compatible with it's parent.
                    if (pr != null) {
                        // close the pull-request since the fork is out of date
                        log.info("closing existing pr: {}", pr.getUrl());
                        try {
                            pr.close();
                        } catch (IOException e) {
                            log.info("Issues closing the pull request '{}'. Moving ahead...", pr.getUrl());
                        }
                    }

                    if (fork == null) {
                        log.info("Could not fork {}", parentRepoName);
                    } else {
                        // Add repos to pathToDockerfilesInParentRepo and imagesFoundInParentRepo only if we forked it successfully.
                        pathToDockerfilesInParentRepo.put(parentRepoName, c.getPath());
                        imagesFoundInParentRepo.put(parentRepoName, image);
                        parentReposForked.add(parentRepoName);
                    }
                }
            }
        }

        log.info("Path to Dockerfiles in repo '{}': {}", parentRepoName, pathToDockerfilesInParentRepo);
        log.info("All images found in repo '{}': {}", parentRepoName, imagesFoundInParentRepo);
    }

}