From 95cd6b6e9006517b88b7b1c04042c8c9105b558d Mon Sep 17 00:00:00 2001 From: KOUNOIKE Yuusuke Date: Sat, 27 Jan 2018 17:52:06 +0900 Subject: [PATCH] fix for build and test --- src/main/scala/gitbucket/core/controller/IndexController.scala | 3 +++ .../gitbucket/core/controller/RepositoryViewerController.scala | 1 + src/main/scala/gitbucket/core/service/RequestCache.scala | 3 ++- src/main/twirl/gitbucket/core/issues/commentlist.scala.html | 2 -- .../scala/gitbucket/core/service/PullRequestServiceSpec.scala | 3 ++- src/test/scala/gitbucket/core/service/ServiceSpecBase.scala | 2 +- src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala | 3 ++- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/scala/gitbucket/core/controller/IndexController.scala b/src/main/scala/gitbucket/core/controller/IndexController.scala index bdfab51ab..f5390b4a3 100644 --- a/src/main/scala/gitbucket/core/controller/IndexController.scala +++ b/src/main/scala/gitbucket/core/controller/IndexController.scala @@ -20,6 +20,9 @@ class IndexController extends IndexControllerBase with AccountService with RepositorySearchService with IssuesService + with LabelsService + with MilestonesService + with PrioritiesService with UsersAuthenticator with ReferrerAuthenticator with AccountFederationService diff --git a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala index 2c5688ac4..312a82840 100644 --- a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala +++ b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala @@ -32,6 +32,7 @@ import org.scalatra.i18n.Messages class RepositoryViewerController extends RepositoryViewerControllerBase with RepositoryService with AccountService with ActivityService with IssuesService with WebHookService with CommitsService + with LabelsService with MilestonesService with PrioritiesService with ReadableUsersAuthenticator with ReferrerAuthenticator with WritableUsersAuthenticator with PullRequestService with CommitStatusService with WebHookPullRequestService with WebHookPullRequestReviewCommentService with ProtectedBranchService diff --git a/src/main/scala/gitbucket/core/service/RequestCache.scala b/src/main/scala/gitbucket/core/service/RequestCache.scala index bd03cd8c9..5e2e754c6 100644 --- a/src/main/scala/gitbucket/core/service/RequestCache.scala +++ b/src/main/scala/gitbucket/core/service/RequestCache.scala @@ -11,7 +11,8 @@ import Implicits.request2Session * It may be called many times in one request, so each method stores * its result into the cache which available during a request. */ -trait RequestCache extends SystemSettingsService with AccountService with IssuesService with RepositoryService { +trait RequestCache extends SystemSettingsService with AccountService with IssuesService with RepositoryService + with LabelsService with MilestonesService with PrioritiesService { private implicit def context2Session(implicit context: Context): Session = request2Session(context.request) diff --git a/src/main/twirl/gitbucket/core/issues/commentlist.scala.html b/src/main/twirl/gitbucket/core/issues/commentlist.scala.html index fe7d81f2a..4fa0b8ece 100644 --- a/src/main/twirl/gitbucket/core/issues/commentlist.scala.html +++ b/src/main/twirl/gitbucket/core/issues/commentlist.scala.html @@ -35,8 +35,6 @@ @comments.map { case comment: gitbucket.core.model.IssueComment => { @comment.action match { - case "close" => { - } case "commit" => { @defining({ val (content, id) = " ([a-f0-9]{40})$".r.findFirstMatchIn(comment.content) diff --git a/src/test/scala/gitbucket/core/service/PullRequestServiceSpec.scala b/src/test/scala/gitbucket/core/service/PullRequestServiceSpec.scala index f0437c988..08c442f57 100644 --- a/src/test/scala/gitbucket/core/service/PullRequestServiceSpec.scala +++ b/src/test/scala/gitbucket/core/service/PullRequestServiceSpec.scala @@ -4,7 +4,8 @@ import gitbucket.core.model._ import org.scalatest.FunSpec class PullRequestServiceSpec extends FunSpec with ServiceSpecBase - with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService { + with PullRequestService with IssuesService with AccountService with RepositoryService with CommitsService + with LabelsService with MilestonesService with PrioritiesService { def swap(r: (Issue, PullRequest)) = (r._2 -> r._1) diff --git a/src/test/scala/gitbucket/core/service/ServiceSpecBase.scala b/src/test/scala/gitbucket/core/service/ServiceSpecBase.scala index fe3ee8354..a2a28476a 100644 --- a/src/test/scala/gitbucket/core/service/ServiceSpecBase.scala +++ b/src/test/scala/gitbucket/core/service/ServiceSpecBase.scala @@ -45,7 +45,7 @@ trait ServiceSpecBase { def user(name:String)(implicit s:Session):Account = AccountService.getAccountByUserName(name).get lazy val dummyService = new RepositoryService with AccountService with IssuesService with PullRequestService - with CommitsService with CommitStatusService with LabelsService (){} + with CommitsService with CommitStatusService with LabelsService with MilestonesService with PrioritiesService (){} def generateNewUserWithDBRepository(userName:String, repositoryName:String)(implicit s:Session):Account = { val ac = AccountService.getAccountByUserName(userName).getOrElse(generateNewAccount(userName)) diff --git a/src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala b/src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala index f3c053556..32fdb655f 100644 --- a/src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala +++ b/src/test/scala/gitbucket/core/service/WebHookServiceSpec.scala @@ -6,7 +6,8 @@ import gitbucket.core.model.WebHookContentType class WebHookServiceSpec extends FunSuite with ServiceSpecBase { - lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService with IssuesService with CommitsService + lazy val service = new WebHookPullRequestService with AccountService with RepositoryService with PullRequestService + with IssuesService with CommitsService with LabelsService with MilestonesService with PrioritiesService test("WebHookPullRequestService.getPullRequestsByRequestForWebhook") { withTestDB { implicit session => val user1 = generateNewUserWithDBRepository("user1","repo1")