Package org.kohsuke.github
Class GitUser
- java.lang.Object
-
- org.kohsuke.github.GitUser
-
- Direct Known Subclasses:
GHCommit.GHAuthor
,GHCompare.User
,GHPullRequestCommitDetail.Authorship
public class GitUser extends Object
Represents a user in Git who authors/commits a commit.In contrast,
GHUser
is an user of GitHub. Because Git allows a person to use multiple e-mail addresses and names when creating a commit, there's generally no meaningful mapping betweenGHUser
andGitUser
.- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Date
getDate()
Gets date.String
getEmail()
Gets the git email for an author or committer on a git commit.String
getName()
Gets the git user name for an author or committer on a git commit.String
getUsername()
Gets username.
-
-
-
Constructor Detail
-
GitUser
public GitUser()
Instantiates a new git user.
-
GitUser
public GitUser(GitUser user)
Instantiates a new git user.- Parameters:
user
- the user
-
-
Method Detail
-
getName
public String getName()
Gets the git user name for an author or committer on a git commit.- Returns:
- Human readable name of the user, such as "Kohsuke Kawaguchi"
-
getEmail
public String getEmail()
Gets the git email for an author or committer on a git commit.- Returns:
- E-mail address, such as "[email protected]"
-
getUsername
@CheckForNull public String getUsername()
Gets username. Note: it presents only in events.- Returns:
- GitHub username
-
getDate
public Date getDate()
Gets date.- Returns:
- Commit Date.
-
-