private Map toSuggestion()

in TeamCity.GitHubIssues-server/src/main/java/jetbrains/buildServer/issueTracker/github/health/IssueTrackerSuggestion.java [103:126]


  private Map<String, Object> toSuggestion(@NotNull final String fetchUrl) {
    Matcher m;
    boolean matched = false;
    m = sshPattern.matcher(fetchUrl);
    String owner = null;
    String repo = null;
    if (m.matches()) {
      owner = m.group(1);
      repo = m.group(2);
      matched = true;
    }
    if (!matched) {
      m = httpsPattern.matcher(fetchUrl);
      if (m.matches()) {
        owner = m.group(1);
        repo = StringUtil.removeSuffix(m.group(2), ".git", true);
        matched = true;
      }
    }
    if (matched && myHelper.hasIssues(owner, repo)) {
      return getSuggestionMap(owner, repo);
    }
    return null;
  }