diff --git a/src/main/scala/gitbucket/core/api/ApiCommits.scala b/src/main/scala/gitbucket/core/api/ApiCommits.scala index 7a7a5ab..dc3e2ad 100644 --- a/src/main/scala/gitbucket/core/api/ApiCommits.scala +++ b/src/main/scala/gitbucket/core/api/ApiCommits.scala @@ -26,20 +26,12 @@ committer: ApiPersonIdent, message: String, comment_count: Int, - tree: Tree, - verification: Verification + tree: Tree ) case class Tree( url: ApiPath, - tree: String - ) - - case class Verification( - verified: Boolean, - reason: String //, - // signature: String, - // payload: String + sha: String ) case class Stats( @@ -62,7 +54,6 @@ def apply(repositoryName: RepositoryName, commitInfo: CommitInfo, diffs: Seq[DiffInfo], author: Account, committer: Account, commentCount: Int): ApiCommits = { - // Is there better way to get diff status? val files = diffs.map { diff => var additions = 0 var deletions = 0 @@ -111,13 +102,7 @@ comment_count = commentCount, tree = Tree( url = ApiPath(s"/api/v3/repos/${repositoryName.fullName}/tree/${commitInfo.id}"), // TODO This endpoint has not been implemented yet. - tree = commitInfo.id - ), - verification = Verification( // TODO - verified = false, - reason = "" //, -// signature = "", -// payload = "" + sha = commitInfo.id ) ), author = ApiUser(author), @@ -125,7 +110,7 @@ parents = commitInfo.parents.map { parent => Tree( url = ApiPath(s"/api/v3/repos/${repositoryName.fullName}/tree/${parent}"), // TODO This endpoint has not been implemented yet. - tree = parent + sha = parent ) }, stats = Stats( diff --git a/src/main/scala/gitbucket/core/api/JsonFormat.scala b/src/main/scala/gitbucket/core/api/JsonFormat.scala index 4613119..7164cf6 100644 --- a/src/main/scala/gitbucket/core/api/JsonFormat.scala +++ b/src/main/scala/gitbucket/core/api/JsonFormat.scala @@ -36,7 +36,6 @@ FieldSerializer[ApiCommits]() + FieldSerializer[ApiCommits.Commit]() + FieldSerializer[ApiCommits.Tree]() + - FieldSerializer[ApiCommits.Verification]() + FieldSerializer[ApiCommits.Stats]() + FieldSerializer[ApiCommits.File]() + ApiBranchProtection.enforcementLevelSerializer