class GithubSolverResolver {

    public Optional<String> resolve(final Document document, final GithubId issueGithubId) {
        return document.select(".TimelineItem")
                       .stream()
                       .filter(this::isPullRequest)
                       .filter(this::isMerged)
                       .map(this::resolvePullRequestGithubId)
                       .map(this::fetchPullrequest)
                       .filter(pullRequest -> pullRequest != null && pullRequestFixesIssue(pullRequest, issueGithubId))
                       .map(pullRequest -> pullRequest.getUser().getLogin())
                       .filter(StringUtils::isNotEmpty)
                       .findFirst();
    }

    public  GithubSolverResolver(final GithubGateway githubGateway);

}