From b35d0792aa060b50545db7293839aab0053221fd Mon Sep 17 00:00:00 2001 From: onukura Date: Sat, 12 Sep 2020 14:56:41 +0900 Subject: [PATCH] fix list commit api sha param (#2550) --- .../core/controller/api/ApiRepositoryCommitControllerBase.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/gitbucket/core/controller/api/ApiRepositoryCommitControllerBase.scala b/src/main/scala/gitbucket/core/controller/api/ApiRepositoryCommitControllerBase.scala index a6864f4d9..9d241a6e3 100644 --- a/src/main/scala/gitbucket/core/controller/api/ApiRepositoryCommitControllerBase.scala +++ b/src/main/scala/gitbucket/core/controller/api/ApiRepositoryCommitControllerBase.scala @@ -23,7 +23,7 @@ trait ApiRepositoryCommitControllerBase extends ControllerBase { val owner = repository.owner val name = repository.name // TODO: The following parameters need to be implemented. [:path, :author, :since, :until] - val sha = if (request.body.nonEmpty) (parse(request.body) \ "sha").extract[String] else "refs/heads/master"; + val sha = params.getOrElse("sha", "refs/heads/master") Using.resource(Git.open(getRepositoryDir(owner, name))) { git => val repo = git.getRepository