Package hudson.plugins.git
Class GitChangeSet
java.lang.Object
hudson.scm.ChangeLogSet.Entry
hudson.plugins.git.GitChangeSet
Represents a change set.
- Author:
- Nigel Magnay
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGitChangeSet
(List<String> lines, boolean authorOrCommitter) Create Git change set using information in given lines.GitChangeSet
(List<String> lines, boolean authorOrCommitter, boolean retainFullCommitSummary) Create Git change set using information in given lines. -
Method Summary
Modifier and TypeMethodDescriptionboolean
findOrCreateUser
(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail) Deprecated.findOrCreateUser
(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail, boolean useExistingAccountWithSameEmail) Returns user of the change set.Gets the author name for this changeset - note that this is mainly here so that we can test authorOrCommitter without needing a fully instantiated Jenkins (which is needed for User.get in getAuthor()).Gets the comment fully marked up byChangeLogAnnotator
.getDate()
getId()
getMsg()
getPaths()
Gets the files that are changed in this commit.long
int
hashCode()
void
setParent
(ChangeLogSet parent) Methods inherited from class hudson.scm.ChangeLogSet.Entry
getMsgAnnotated, getMsgEscaped, getParent
-
Field Details
-
LOGGER
-
-
Constructor Details
-
GitChangeSet
Create Git change set using information in given lines.- Parameters:
lines
- change set lines read to construct change setauthorOrCommitter
- if true, use author information (name, time), otherwise use committer information
-
GitChangeSet
Create Git change set using information in given lines.- Parameters:
lines
- change set lines read to construct change setauthorOrCommitter
- if true, use author information (name, time), otherwise use committer informationretainFullCommitSummary
- if true, do not truncate commit summary in the 'Changes' page
-
-
Method Details
-
getDate
-
getAuthorEmail
-
getTimestamp
public long getTimestamp()- Overrides:
getTimestamp
in classChangeLogSet.Entry
-
getCommitId
- Overrides:
getCommitId
in classChangeLogSet.Entry
-
setParent
- Overrides:
setParent
in classChangeLogSet.Entry
-
getParentCommit
-
getAffectedPaths
- Specified by:
getAffectedPaths
in classChangeLogSet.Entry
-
getPaths
Gets the files that are changed in this commit.- Returns:
- can be empty but never null.
-
getAffectedFiles
- Overrides:
getAffectedFiles
in classChangeLogSet.Entry
-
findOrCreateUser
@Deprecated public User findOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail) Deprecated.Returns user of the change set.- Parameters:
csAuthor
- user name.csAuthorEmail
- user email.createAccountBasedOnEmail
- true if create new user based on committer's email.- Returns:
User
-
findOrCreateUser
public User findOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail, boolean useExistingAccountWithSameEmail) Returns user of the change set.- Parameters:
csAuthor
- user name.csAuthorEmail
- user email.createAccountBasedOnEmail
- true if create new user based on committer's email.useExistingAccountWithSameEmail
- true if users should be searched for their email attribute- Returns:
User
-
getAuthor
- Specified by:
getAuthor
in classChangeLogSet.Entry
-
getAuthorName
Gets the author name for this changeset - note that this is mainly here so that we can test authorOrCommitter without needing a fully instantiated Jenkins (which is needed for User.get in getAuthor()).- Returns:
- author name
-
getMsg
- Specified by:
getMsg
in classChangeLogSet.Entry
-
getId
-
getRevision
-
getComment
-
getCommentAnnotated
Gets the comment fully marked up byChangeLogAnnotator
.- Returns:
- annotated comment
-
getBranch
-
equals
-
hashCode
public int hashCode()
-
findOrCreateUser(String,String,boolean,boolean)