public void init(int pullRequestNumber, File projectBaseDir) { initGitBaseDir(projectBaseDir); try { GitHub github; if (config.isProxyConnectionEnabled()) { github = new GitHubBuilder().withProxy(config.getHttpProxy()).withEndpoint(config.endpoint()).withOAuthToken(config.oauth()).build(); } else { github = new GitHubBuilder().withEndpoint(config.endpoint()).withOAuthToken(config.oauth()).build(); } setGhRepo(github.getRepository(config.repository())); setPr(ghRepo.getPullRequest(pullRequestNumber)); LOG.info("Starting analysis of pull request: " + pr.getHtmlUrl()); myself = github.getMyself().getLogin(); loadExistingReviewComments(); patchPositionMappingByFile = mapPatchPositionsToLines(pr); } catch (IOException e) { LOG.debug("Unable to perform GitHub WS operation", e); throw MessageException.of("Unable to perform GitHub WS operation: " + e.getMessage()); } }