@Nullable static String configureUpstreamRemote( @NotNull Project project, @NotNull GitRepository gitRepository, @NotNull ProgressIndicator indicator) { GithubRepoDetailed repositoryInfo = loadRepositoryInfo(project, gitRepository, indicator); if (repositoryInfo == null) { return null; } if (!repositoryInfo.isFork() || repositoryInfo.getParent() == null) { GithubNotifications.showWarningURL( project, CANNOT_PERFORM_GITHUB_REBASE, "GitHub repository ", "'" + repositoryInfo.getName() + "'", " is not a forked one", repositoryInfo.getHtmlUrl()); return null; } final String parentRepoUrl = GithubUrlUtil.getCloneUrl(repositoryInfo.getParent().getFullPath()); LOG.info("Adding GitHub parent as a remote host"); indicator.setText("Adding GitHub parent as a remote host..."); if (GithubUtil.addGithubRemote(project, gitRepository, "upstream", parentRepoUrl)) { return parentRepoUrl; } else { return null; } }