From f73c86d53330e31bd28f5b9e9a7214e82cfe7803 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 18 Aug 2015 09:14:44 +0300 Subject: [PATCH] Updated to fix truncated name in JSON: watchers_coun The correct field in the JSON should be `watchers_count` rather than the truncated version `watchers_coun`. --- src/main/scala/gitbucket/core/api/ApiRepository.scala | 2 +- src/test/scala/gitbucket/core/api/JsonFormatSpec.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/gitbucket/core/api/ApiRepository.scala b/src/main/scala/gitbucket/core/api/ApiRepository.scala index 0911882bb..ee97ea324 100644 --- a/src/main/scala/gitbucket/core/api/ApiRepository.scala +++ b/src/main/scala/gitbucket/core/api/ApiRepository.scala @@ -15,7 +15,7 @@ case class ApiRepository( default_branch: String, owner: ApiUser) { val forks_count = forks - val watchers_coun = watchers + val watchers_count = watchers val url = ApiPath(s"/api/v3/repos/${full_name}") val http_url = ApiPath(s"/git/${full_name}.git") val clone_url = ApiPath(s"/git/${full_name}.git") diff --git a/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala b/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala index c56447835..6308d26f9 100644 --- a/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala +++ b/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala @@ -56,7 +56,7 @@ class JsonFormatSpec extends Specification { "default_branch" : "master", "owner" : $apiUserJson, "forks_count" : 0, - "watchers_coun" : 0, + "watchers_count" : 0, "url" : "${context.baseUrl}/api/v3/repos/octocat/Hello-World", "http_url" : "${context.baseUrl}/git/octocat/Hello-World.git", "clone_url" : "${context.baseUrl}/git/octocat/Hello-World.git",