Class GitInfoUtils
- java.lang.Object
-
- org.datadog.jenkins.plugins.datadog.traces.GitInfoUtils
-
public class GitInfoUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
filterSensitiveInfo(String urlStr)
Filters the user info given a valid HTTP URL.static String
normalizeBranch(String branchName)
Returns a normalized git branch E.g.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
-
-
-
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
-
-