Class RemoteUrls
java.lang.Object
io.github.jbastgen.stemma.app.git.RemoteUrls
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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe hosting services whose address scheme is known.static final recordA repository on a service:baseis the address of its web page, without a trailing slash. -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String, RemoteUrls.Service> customHosts(String settingsText) The hosts that Stemma cannot tell by their name, from the settings: onehost = serviceper line, for examplegit.example.org = gitlab; blank lines and lines starting with#are ignored.static Optional<RemoteUrls.Site> parse(String remoteUrl, Map<String, RemoteUrls.Service> custom) The site of a remote URL.
-
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
The hosts that Stemma cannot tell by their name, from the settings: onehost = serviceper line, for examplegit.example.org = gitlab; blank lines and lines starting with#are ignored.
-