Class RemoteUrls

java.lang.Object
io.github.jbastgen.stemma.app.git.RemoteUrls

public final class RemoteUrls extends Object
The web pages of a repository on a hosting service (feature 14): derived from the remote's URL (git@github.com:org/repo.git and https://github.com/org/repo.git both give https://github.com/org/repo), with the page of a branch, a commit, a file and the pull or merge requests for the services Stemma knows (GitHub, GitLab, Bitbucket, Azure DevOps, Gitea and Forgejo). Servers of your own are named in the settings. Only addresses are made; nothing is read from the network and no credentials are used.
  • Method Details

    • parse

      public static Optional<RemoteUrls.Site> parse(String remoteUrl, Map<String,RemoteUrls.Service> custom)
      The site of a remote URL.
      Parameters:
      custom - the hosts that are named in the settings: host (lower case) to service
      Returns:
      empty if the URL is no address of a hosted repository (a path on this computer, for example)
    • customHosts

      public static Map<String,RemoteUrls.Service> customHosts(String settingsText)
      The hosts that Stemma cannot tell by their name, from the settings: one host = service per line, for example git.example.org = gitlab; blank lines and lines starting with # are ignored.