diff --git a/src/main/scala/gitbucket/core/api/ApiIssue.scala b/src/main/scala/gitbucket/core/api/ApiIssue.scala index b03cf48..5688ae0 100644 --- a/src/main/scala/gitbucket/core/api/ApiIssue.scala +++ b/src/main/scala/gitbucket/core/api/ApiIssue.scala @@ -18,6 +18,7 @@ updated_at: Date, body: String )(repositoryName: RepositoryName, isPullRequest: Boolean) { + val id = 0 // dummy id val comments_url = ApiPath(s"/api/v3/repos/${repositoryName.fullName}/issues/${number}/comments") val html_url = ApiPath(s"/${repositoryName.fullName}/${if (isPullRequest) { "pull" } else { "issues" }}/${number}") val pull_request = if (isPullRequest) { diff --git a/src/main/scala/gitbucket/core/api/ApiPullRequest.scala b/src/main/scala/gitbucket/core/api/ApiPullRequest.scala index 50d20b3..c094db4 100644 --- a/src/main/scala/gitbucket/core/api/ApiPullRequest.scala +++ b/src/main/scala/gitbucket/core/api/ApiPullRequest.scala @@ -23,6 +23,7 @@ labels: List[ApiLabel], assignee: Option[ApiUser] ) { + val id = 0 // dummy id val html_url = ApiPath(s"${base.repo.html_url.path}/pull/${number}") //val diff_url = ApiPath(s"${base.repo.html_url.path}/pull/${number}.diff") //val patch_url = ApiPath(s"${base.repo.html_url.path}/pull/${number}.patch") diff --git a/src/main/scala/gitbucket/core/api/ApiRepository.scala b/src/main/scala/gitbucket/core/api/ApiRepository.scala index 549e8e7..8fe2c8a 100644 --- a/src/main/scala/gitbucket/core/api/ApiRepository.scala +++ b/src/main/scala/gitbucket/core/api/ApiRepository.scala @@ -14,6 +14,7 @@ default_branch: String, owner: ApiUser )(urlIsHtmlUrl: Boolean) { + val id = 0 // dummy id val forks_count = forks val watchers_count = watchers val url = if (urlIsHtmlUrl) { diff --git a/src/main/scala/gitbucket/core/api/ApiUser.scala b/src/main/scala/gitbucket/core/api/ApiUser.scala index 5d74e40..9a65966 100644 --- a/src/main/scala/gitbucket/core/api/ApiUser.scala +++ b/src/main/scala/gitbucket/core/api/ApiUser.scala @@ -5,6 +5,7 @@ import java.util.Date case class ApiUser(login: String, email: String, `type`: String, site_admin: Boolean, created_at: Date) { + val id = 0 // dummy id val url = ApiPath(s"/api/v3/users/${login}") val html_url = ApiPath(s"/${login}") val avatar_url = ApiPath(s"/${login}/_avatar") diff --git a/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala b/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala index f5b0b80..733d53b 100644 --- a/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala +++ b/src/test/scala/gitbucket/core/api/JsonFormatSpec.scala @@ -30,6 +30,7 @@ "email":"octocat@example.com", "type":"User", "site_admin":false, + "id": 0, "created_at":"2011-04-14T16:00:49Z", "url":"http://gitbucket.exmple.com/api/v3/users/octocat", "html_url":"http://gitbucket.exmple.com/octocat", @@ -50,6 +51,7 @@ "name" : "Hello-World", "full_name" : "octocat/Hello-World", "description" : "This your first repo!", + "id": 0, "watchers" : 0, "forks" : 0, "private" : false, @@ -228,6 +230,7 @@ "title": "Found a bug", "body": "I'm having a problem with this.", "user": $apiUserJson, + "id": 0, "labels": [$apiLabelJson], "comments_url": "${context.baseUrl}/api/v3/repos/octocat/Hello-World/issues/1347/comments", "html_url": "${context.baseUrl}/octocat/Hello-World/issues/1347", @@ -251,6 +254,7 @@ "title": "Found a bug", "body": "I'm having a problem with this.", "user": $apiUserJson, + "id": 0, "labels": [$apiLabelJson], "comments_url": "${context.baseUrl}/api/v3/repos/octocat/Hello-World/issues/1347/comments", "html_url": "${context.baseUrl}/octocat/Hello-World/pull/1347", @@ -285,6 +289,7 @@ val apiPullRequestJson = s"""{ "number": 1347, "state" : "open", + "id": 0, "updated_at": "2011-04-14T16:00:49Z", "created_at": "2011-04-14T16:00:49Z", // "closed_at": "2011-04-14T16:00:49Z",