Class GitInfoUtils


  • public class GitInfoUtils
    extends Object
    • Method Detail

      • normalizeTag

        public static String normalizeTag​(String tagName)
        Returns a normalized git tag E.g: refs/heads/tags/0.1.0 or origin/tags/0.1.0 returns 0.1.0
        Parameters:
        tagName - the tag name to normalize
        Returns:
        normalized git tag
      • normalizeBranch

        public static String normalizeBranch​(String branchName)
        Returns a normalized git branch E.g. refs/heads/master or origin/master returns master
        Parameters:
        branchName - the branch name to normalize
        Returns:
        normalized git tag
      • filterSensitiveInfo

        public static String filterSensitiveInfo​(String urlStr)
        Filters the user info given a valid HTTP URL.
        Parameters:
        urlStr - input URL
        Returns:
        URL without user info.