public class GitUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
HTTP_GITHUB_USER_REPO_PATTERN |
static Pattern |
SSH_GITHUB_USER_REPO_PATTERN |
| Constructor and Description |
|---|
GitUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getRepoName(String gitRepoUrl)
Extract repo name from Git URL.
|
static String |
getUserRepo(String gitRepoUrl)
Extract user name and repo name from Git URL.
|
public static final Pattern HTTP_GITHUB_USER_REPO_PATTERN
public static final Pattern SSH_GITHUB_USER_REPO_PATTERN
public static String getRepoName(String gitRepoUrl)
https://github.com/terma/jenkins-github-coverage-updater.git
Result: jenkins-github-coverage-updatergitRepoUrl - - Git repository URLpublic static String getUserRepo(String gitRepoUrl)
https://github.com/terma/jenkins-github-coverage-updater.git
Result: terma/jenkins-github-coverage-updatergitRepoUrl - - Git repository URLCopyright © 2016–2022. All rights reserved.