Object VcsHost.Companion

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final VcsHost fromUrl(URI url) Return the applicable VcsHost for the given url, or null if no applicable host is found.
      final VcsHost fromUrl(String url) Return the applicable VcsHost for the given url, or null if no applicable host is found.
      final VcsInfo parseUrl(String vcsUrl) Return all VcsInfo that can be parsed from the vcsUrl without actually making a network request.
      final String toPermalink(VcsInfo vcsInfo, Integer startLine, Integer endLine) Return the host-specific permanent link to browse the code location described by vcsInfo with optional highlighting of startLine to endLine.
      final String toArchiveDownloadUrl(VcsInfo vcsInfo) Return the download URL to an archive generated for the referenced vcsInfo, or null if no download URL can be determined.
      final String toRawDownloadUrl(String fileUrl) Return the download URL to the raw file referenced by fileUrl, or null if no raw download URL can be determined.
      final String getProject(String projectUrl) Return the project's name, with generic handling of unknown VCS hosts (those not covered by the enumeration, e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • parseUrl

         final VcsInfo parseUrl(String vcsUrl)

        Return all VcsInfo that can be parsed from the vcsUrl without actually making a network request.

      • toArchiveDownloadUrl

         final String toArchiveDownloadUrl(VcsInfo vcsInfo)

        Return the download URL to an archive generated for the referenced vcsInfo, or null if no download URL can be determined.

      • toRawDownloadUrl

         final String toRawDownloadUrl(String fileUrl)

        Return the download URL to the raw file referenced by fileUrl, or null if no raw download URL can be determined.

      • getProject

         final String getProject(String projectUrl)

        Return the project's name, with generic handling of unknown VCS hosts (those not covered by the enumeration, e.g. an on-premises Git server).