Class RepositoryUriResolver

    • Constructor Detail

      • RepositoryUriResolver

        public RepositoryUriResolver()
    • Method Detail

      • getRepositoryUri

        @NonNull
        public abstract String getRepositoryUri​(@NonNull
                                                String apiUri,
                                                @NonNull
                                                String owner,
                                                @NonNull
                                                String repository)
        Resolves the URI of a repository.
        Parameters:
        apiUri - the API URL of the GitHub server.
        owner - the owner of the repository.
        repository - the name of the repository.
        Returns:
        the GIT URL of the repository.
      • hostnameFromApiUri

        @NonNull
        public static String hostnameFromApiUri​(@CheckForNull
                                                String apiUri)
        Helper method that returns the hostname of a GitHub server from its API URL.
        Parameters:
        apiUri - the API URL.
        Returns:
        the hostname of a GitHub server