Merge branch 'show-author'

This commit is contained in:
Tomofumi Tanaka
2014-07-31 22:48:15 +09:00
14 changed files with 86 additions and 40 deletions

View File

@@ -90,15 +90,15 @@ object WebHookService {
WebHookCommit(
id = commit.id,
message = commit.fullMessage,
timestamp = commit.time.toString,
timestamp = commit.commitTime.toString,
url = commitUrl,
added = diffs._1.collect { case x if(x.changeType == DiffEntry.ChangeType.ADD) => x.newPath },
removed = diffs._1.collect { case x if(x.changeType == DiffEntry.ChangeType.DELETE) => x.oldPath },
modified = diffs._1.collect { case x if(x.changeType != DiffEntry.ChangeType.ADD &&
x.changeType != DiffEntry.ChangeType.DELETE) => x.newPath },
author = WebHookUser(
name = commit.committer,
email = commit.mailAddress
name = commit.committerName,
email = commit.committerEmailAddress
)
)
},

View File

@@ -64,7 +64,7 @@ trait WikiService {
if(!JGitUtil.isEmpty(git)){
JGitUtil.getFileList(git, "master", ".").find(_.name == pageName + ".md").map { file =>
WikiPageInfo(file.name, StringUtil.convertFromByteArray(git.getRepository.open(file.id).getBytes),
file.committer, file.time, file.commitId)
file.author, file.time, file.commitId)
}
} else None
}