org.jenkinsci.plugins.pretestedintegration.scm.git
Class GitUtils
java.lang.Object
org.jenkinsci.plugins.pretestedintegration.scm.git.GitUtils
public class GitUtils
- extends Object
|
Method Summary |
static String |
getCommitMessageUsingSHA1(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId SHA1)
Gets the commit message using the provided SHA1 |
static String |
removeRemoteFromBranchName(org.eclipse.jgit.lib.Repository repository,
String branchName)
Iterates the list of remotes from the provided repository
and removes the first remote from the provided branch name that matches |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GitUtils
public GitUtils()
removeRemoteFromBranchName
public static String removeRemoteFromBranchName(org.eclipse.jgit.lib.Repository repository,
String branchName)
- Iterates the list of remotes from the provided repository
and removes the first remote from the provided branch name that matches
- Parameters:
repository - the repository that will be used to compare the remotes frombranchName - the branch name that needs remote removed from it
- Returns:
- If the provided branch name is "origin/ready/feat_1" the method will
match the remote from the repository, remove it and return "ready/feat_1"
getCommitMessageUsingSHA1
public static String getCommitMessageUsingSHA1(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId SHA1)
throws IOException
- Gets the commit message using the provided SHA1
- Parameters:
repository - repository that will be used to look for the specific commitSHA1 - this will identify the revision
- Returns:
- Returns the full commit message
- Throws:
IOException
Copyright © 2004–2014. All rights reserved.