コード例 #1
0
 private void doLoadForksFromGit(@NotNull ProgressIndicator indicator) {
   for (GitRemote remote : myGitRepository.getRemotes()) {
     for (String url : remote.getUrls()) {
       if (GithubUrlUtil.isGithubUrl(url)) {
         GithubFullPath path = GithubUrlUtil.getUserAndRepositoryFromRemoteUrl(url);
         if (path != null) {
           doAddFork(path, remote.getName(), indicator);
           break;
         }
       }
     }
   }
 }
コード例 #2
0
  private void doConfigureRemote(@NotNull ForkInfo fork) {
    if (fork.getRemoteName() != null) return;

    GithubFullPath path = fork.getPath();
    String url = GithubUrlUtil.getCloneUrl(path);

    if (GithubUtil.addGithubRemote(myProject, myGitRepository, path.getUser(), url)) {
      fork.setRemoteName(path.getUser());
    }
  }