All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gitbucket.core.api.ApiPersonIdent.scala Maven / Gradle / Ivy

The newest version!
package gitbucket.core.api

import gitbucket.core.util.JGitUtil.CommitInfo

import java.util.Date

case class ApiPersonIdent(name: String, email: String, date: Date)

object ApiPersonIdent {
  def author(commit: CommitInfo): ApiPersonIdent =
    ApiPersonIdent(name = commit.authorName, email = commit.authorEmailAddress, date = commit.authorTime)
  def committer(commit: CommitInfo): ApiPersonIdent =
    ApiPersonIdent(name = commit.committerName, email = commit.committerEmailAddress, date = commit.commitTime)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy