diff --git a/project/build.scala b/project/build.scala index 47f3729..37ec82c 100644 --- a/project/build.scala +++ b/project/build.scala @@ -8,8 +8,8 @@ val Organization = "jp.sf.amateras" val Name = "gitbucket" val Version = "0.0.1" - val ScalaVersion = "2.10.3" - val ScalatraVersion = "2.2.1" + val ScalaVersion = "2.11.2" + val ScalatraVersion = "2.3.0" lazy val project = Project ( "gitbucket", @@ -31,15 +31,15 @@ "org.scalatra" %% "scalatra" % ScalatraVersion, "org.scalatra" %% "scalatra-specs2" % ScalatraVersion % "test", "org.scalatra" %% "scalatra-json" % ScalatraVersion, - "org.json4s" %% "json4s-jackson" % "3.2.5", - "jp.sf.amateras" %% "scalatra-forms" % "0.0.14", + "org.json4s" %% "json4s-jackson" % "3.2.10", + "jp.sf.amateras" %% "scalatra-forms" % "0.1.0", "commons-io" % "commons-io" % "2.4", "org.pegdown" % "pegdown" % "1.4.1", "org.apache.commons" % "commons-compress" % "1.5", "org.apache.commons" % "commons-email" % "1.3.1", "org.apache.httpcomponents" % "httpclient" % "4.3", "org.apache.sshd" % "apache-sshd" % "0.11.0", - "com.typesafe.slick" %% "slick" % "2.0.2", + "com.typesafe.slick" %% "slick" % "2.1.0-RC3", "org.mozilla" % "rhino" % "1.7R4", "com.novell.ldap" % "jldap" % "2009-10-07", "org.quartz-scheduler" % "quartz" % "2.2.1", diff --git a/src/main/scala/app/ControllerBase.scala b/src/main/scala/app/ControllerBase.scala index b36d53c..c31b90f 100644 --- a/src/main/scala/app/ControllerBase.scala +++ b/src/main/scala/app/ControllerBase.scala @@ -24,8 +24,9 @@ implicit val jsonFormats = DefaultFormats - // Don't set content type via Accept header. - override def format(implicit request: HttpServletRequest) = "" +// TODO Scala 2.11 +// // Don't set content type via Accept header. +// override def format(implicit request: HttpServletRequest) = "" override def doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain): Unit = try { val httpRequest = request.asInstanceOf[HttpServletRequest] @@ -125,11 +126,13 @@ } } - override def fullUrl(path: String, params: Iterable[(String, Any)] = Iterable.empty, - includeContextPath: Boolean = true, includeServletPath: Boolean = true) - (implicit request: HttpServletRequest, response: HttpServletResponse) = + // TODO Scala 2.11 + override def url(path: String, params: Iterable[(String, Any)] = Iterable.empty, + includeContextPath: Boolean = true, includeServletPath: Boolean = true, + absolutize: Boolean = true, withSessionId: Boolean = true) + (implicit request: HttpServletRequest, response: HttpServletResponse): String = if (path.startsWith("http")) path - else baseUrl + url(path, params, false, false, false) + else baseUrl + super.url(path, params, false, false, false) } diff --git a/src/main/scala/model/BasicTemplate.scala b/src/main/scala/model/BasicTemplate.scala index e0460a9..6266ebc 100644 --- a/src/main/scala/model/BasicTemplate.scala +++ b/src/main/scala/model/BasicTemplate.scala @@ -8,40 +8,40 @@ val repositoryName = column[String]("REPOSITORY_NAME") def byRepository(owner: String, repository: String) = - (userName is owner.bind) && (repositoryName is repository.bind) + (userName === owner.bind) && (repositoryName === repository.bind) def byRepository(userName: Column[String], repositoryName: Column[String]) = - (this.userName is userName) && (this.repositoryName is repositoryName) + (this.userName === userName) && (this.repositoryName === repositoryName) } trait IssueTemplate extends BasicTemplate { self: Table[_] => val issueId = column[Int]("ISSUE_ID") def byIssue(owner: String, repository: String, issueId: Int) = - byRepository(owner, repository) && (this.issueId is issueId.bind) + byRepository(owner, repository) && (this.issueId === issueId.bind) def byIssue(userName: Column[String], repositoryName: Column[String], issueId: Column[Int]) = - byRepository(userName, repositoryName) && (this.issueId is issueId) + byRepository(userName, repositoryName) && (this.issueId === issueId) } trait LabelTemplate extends BasicTemplate { self: Table[_] => val labelId = column[Int]("LABEL_ID") def byLabel(owner: String, repository: String, labelId: Int) = - byRepository(owner, repository) && (this.labelId is labelId.bind) + byRepository(owner, repository) && (this.labelId === labelId.bind) def byLabel(userName: Column[String], repositoryName: Column[String], labelId: Column[Int]) = - byRepository(userName, repositoryName) && (this.labelId is labelId) + byRepository(userName, repositoryName) && (this.labelId === labelId) } trait MilestoneTemplate extends BasicTemplate { self: Table[_] => val milestoneId = column[Int]("MILESTONE_ID") def byMilestone(owner: String, repository: String, milestoneId: Int) = - byRepository(owner, repository) && (this.milestoneId is milestoneId.bind) + byRepository(owner, repository) && (this.milestoneId === milestoneId.bind) def byMilestone(userName: Column[String], repositoryName: Column[String], milestoneId: Column[Int]) = - byRepository(userName, repositoryName) && (this.milestoneId is milestoneId) + byRepository(userName, repositoryName) && (this.milestoneId === milestoneId) } } diff --git a/src/main/scala/model/Collaborator.scala b/src/main/scala/model/Collaborator.scala index 1b96872..88311e1 100644 --- a/src/main/scala/model/Collaborator.scala +++ b/src/main/scala/model/Collaborator.scala @@ -10,7 +10,7 @@ def * = (userName, repositoryName, collaboratorName) <> (Collaborator.tupled, Collaborator.unapply) def byPrimaryKey(owner: String, repository: String, collaborator: String) = - byRepository(owner, repository) && (collaboratorName is collaborator.bind) + byRepository(owner, repository) && (collaboratorName === collaborator.bind) } } diff --git a/src/main/scala/model/IssueComment.scala b/src/main/scala/model/IssueComment.scala index 8d5e2be..4c8ca6e 100644 --- a/src/main/scala/model/IssueComment.scala +++ b/src/main/scala/model/IssueComment.scala @@ -17,7 +17,7 @@ val updatedDate = column[java.util.Date]("UPDATED_DATE") def * = (userName, repositoryName, issueId, commentId, action, commentedUserName, content, registeredDate, updatedDate) <> (IssueComment.tupled, IssueComment.unapply) - def byPrimaryKey(commentId: Int) = this.commentId is commentId.bind + def byPrimaryKey(commentId: Int) = this.commentId === commentId.bind } } diff --git a/src/main/scala/model/IssueLabels.scala b/src/main/scala/model/IssueLabels.scala index d6b83c1..5d42272 100644 --- a/src/main/scala/model/IssueLabels.scala +++ b/src/main/scala/model/IssueLabels.scala @@ -8,7 +8,7 @@ class IssueLabels(tag: Tag) extends Table[IssueLabel](tag, "ISSUE_LABEL") with IssueTemplate with LabelTemplate { def * = (userName, repositoryName, issueId, labelId) <> (IssueLabel.tupled, IssueLabel.unapply) def byPrimaryKey(owner: String, repository: String, issueId: Int, labelId: Int) = - byIssue(owner, repository, issueId) && (this.labelId is labelId.bind) + byIssue(owner, repository, issueId) && (this.labelId === labelId.bind) } } diff --git a/src/main/scala/model/SshKey.scala b/src/main/scala/model/SshKey.scala index d1d0aab..dcf3463 100644 --- a/src/main/scala/model/SshKey.scala +++ b/src/main/scala/model/SshKey.scala @@ -12,7 +12,7 @@ val publicKey = column[String]("PUBLIC_KEY") def * = (userName, sshKeyId, title, publicKey) <> (SshKey.tupled, SshKey.unapply) - def byPrimaryKey(userName: String, sshKeyId: Int) = (this.userName is userName.bind) && (this.sshKeyId is sshKeyId.bind) + def byPrimaryKey(userName: String, sshKeyId: Int) = (this.userName === userName.bind) && (this.sshKeyId === sshKeyId.bind) } } diff --git a/src/main/scala/model/WebHook.scala b/src/main/scala/model/WebHook.scala index 8eb3719..4c13c87 100644 --- a/src/main/scala/model/WebHook.scala +++ b/src/main/scala/model/WebHook.scala @@ -9,7 +9,7 @@ val url = column[String]("URL") def * = (userName, repositoryName, url) <> (WebHook.tupled, WebHook.unapply) - def byPrimaryKey(owner: String, repository: String, url: String) = byRepository(owner, repository) && (this.url is url.bind) + def byPrimaryKey(owner: String, repository: String, url: String) = byRepository(owner, repository) && (this.url === url.bind) } } diff --git a/src/main/scala/service/AccountService.scala b/src/main/scala/service/AccountService.scala index 8f34dcb..b815c54 100644 --- a/src/main/scala/service/AccountService.scala +++ b/src/main/scala/service/AccountService.scala @@ -75,16 +75,16 @@ } def getAccountByUserName(userName: String, includeRemoved: Boolean = false)(implicit s: Session): Option[Account] = - Accounts filter(t => (t.userName is userName.bind) && (t.removed is false.bind, !includeRemoved)) firstOption + Accounts filter(t => (t.userName === userName.bind) && (t.removed === false.bind, !includeRemoved)) firstOption def getAccountByMailAddress(mailAddress: String, includeRemoved: Boolean = false)(implicit s: Session): Option[Account] = - Accounts filter(t => (t.mailAddress.toLowerCase is mailAddress.toLowerCase.bind) && (t.removed is false.bind, !includeRemoved)) firstOption + Accounts filter(t => (t.mailAddress.toLowerCase === mailAddress.toLowerCase.bind) && (t.removed === false.bind, !includeRemoved)) firstOption def getAllUsers(includeRemoved: Boolean = true)(implicit s: Session): List[Account] = if(includeRemoved){ Accounts sortBy(_.userName) list } else { - Accounts filter (_.removed is false.bind) sortBy(_.userName) list + Accounts filter (_.removed === false.bind) sortBy(_.userName) list } def createAccount(userName: String, password: String, fullName: String, mailAddress: String, isAdmin: Boolean, url: Option[String]) @@ -105,7 +105,7 @@ def updateAccount(account: Account)(implicit s: Session): Unit = Accounts - .filter { a => a.userName is account.userName.bind } + .filter { a => a.userName === account.userName.bind } .map { a => (a.password, a.fullName, a.mailAddress, a.isAdmin, a.url.?, a.registeredDate, a.updatedDate, a.lastLoginDate.?, a.removed) } .update ( account.password, @@ -119,10 +119,10 @@ account.isRemoved) def updateAvatarImage(userName: String, image: Option[String])(implicit s: Session): Unit = - Accounts.filter(_.userName is userName.bind).map(_.image.?).update(image) + Accounts.filter(_.userName === userName.bind).map(_.image.?).update(image) def updateLastLoginDate(userName: String)(implicit s: Session): Unit = - Accounts.filter(_.userName is userName.bind).map(_.lastLoginDate).update(currentDate) + Accounts.filter(_.userName === userName.bind).map(_.lastLoginDate).update(currentDate) def createGroup(groupName: String, url: Option[String])(implicit s: Session): Unit = Accounts insert Account( @@ -140,10 +140,10 @@ isRemoved = false) def updateGroup(groupName: String, url: Option[String], removed: Boolean)(implicit s: Session): Unit = - Accounts.filter(_.userName is groupName.bind).map(t => t.url.? -> t.removed).update(url, removed) + Accounts.filter(_.userName === groupName.bind).map(t => t.url.? -> t.removed).update(url, removed) def updateGroupMembers(groupName: String, members: List[(String, Boolean)])(implicit s: Session): Unit = { - GroupMembers.filter(_.groupName is groupName.bind).delete + GroupMembers.filter(_.groupName === groupName.bind).delete members.foreach { case (userName, isManager) => GroupMembers insert GroupMember (groupName, userName, isManager) } @@ -151,21 +151,21 @@ def getGroupMembers(groupName: String)(implicit s: Session): List[GroupMember] = GroupMembers - .filter(_.groupName is groupName.bind) + .filter(_.groupName === groupName.bind) .sortBy(_.userName) .list def getGroupsByUserName(userName: String)(implicit s: Session): List[String] = GroupMembers - .filter(_.userName is userName.bind) + .filter(_.userName === userName.bind) .sortBy(_.groupName) .map(_.groupName) .list def removeUserRelatedData(userName: String)(implicit s: Session): Unit = { - GroupMembers.filter(_.userName is userName.bind).delete - Collaborators.filter(_.collaboratorName is userName.bind).delete - Repositories.filter(_.userName is userName.bind).delete + GroupMembers.filter(_.userName === userName.bind).delete + Collaborators.filter(_.collaboratorName === userName.bind).delete + Repositories.filter(_.userName === userName.bind).delete } } diff --git a/src/main/scala/service/ActivityService.scala b/src/main/scala/service/ActivityService.scala index 127bae5..76107ae 100644 --- a/src/main/scala/service/ActivityService.scala +++ b/src/main/scala/service/ActivityService.scala @@ -11,9 +11,9 @@ .innerJoin(Repositories).on((t1, t2) => t1.byRepository(t2.userName, t2.repositoryName)) .filter { case (t1, t2) => if(isPublic){ - (t1.activityUserName is activityUserName.bind) && (t2.isPrivate is false.bind) + (t1.activityUserName === activityUserName.bind) && (t2.isPrivate === false.bind) } else { - (t1.activityUserName is activityUserName.bind) + (t1.activityUserName === activityUserName.bind) } } .sortBy { case (t1, t2) => t1.activityId desc } @@ -24,7 +24,7 @@ def getRecentActivities()(implicit s: Session): List[Activity] = Activities .innerJoin(Repositories).on((t1, t2) => t1.byRepository(t2.userName, t2.repositoryName)) - .filter { case (t1, t2) => t2.isPrivate is false.bind } + .filter { case (t1, t2) => t2.isPrivate === false.bind } .sortBy { case (t1, t2) => t1.activityId desc } .map { case (t1, t2) => t1 } .take(30) @@ -33,7 +33,7 @@ def getRecentActivitiesByOwners(owners : Set[String])(implicit s: Session): List[Activity] = Activities .innerJoin(Repositories).on((t1, t2) => t1.byRepository(t2.userName, t2.repositoryName)) - .filter { case (t1, t2) => (t2.isPrivate is false.bind) || (t2.userName inSetBind owners) } + .filter { case (t1, t2) => (t2.isPrivate === false.bind) || (t2.userName inSetBind owners) } .sortBy { case (t1, t2) => t1.activityId desc } .map { case (t1, t2) => t1 } .take(30) diff --git a/src/main/scala/service/IssuesService.scala b/src/main/scala/service/IssuesService.scala index c123be9..292b93a 100644 --- a/src/main/scala/service/IssuesService.scala +++ b/src/main/scala/service/IssuesService.scala @@ -166,13 +166,13 @@ .getOrElse (repos) .map { case (owner, repository) => t1.byRepository(owner, repository) } .foldLeft[Column[Boolean]](false) ( _ || _ ) && - (t1.closed is (condition.state == "closed").bind) && - (t1.milestoneId is condition.milestoneId.get.get.bind, condition.milestoneId.flatten.isDefined) && - (t1.milestoneId isNull, condition.milestoneId == Some(None)) && - (t1.assignedUserName is filterUser("assigned").bind, filterUser.get("assigned").isDefined) && - (t1.openedUserName is filterUser("created_by").bind, filterUser.get("created_by").isDefined) && - (t1.openedUserName isNot filterUser("not_created_by").bind, filterUser.get("not_created_by").isDefined) && - (t1.pullRequest is true.bind, onlyPullRequest) && + (t1.closed === (condition.state == "closed").bind) && + (t1.milestoneId === condition.milestoneId.get.get.bind, condition.milestoneId.flatten.isDefined) && + (t1.milestoneId.? isEmpty, condition.milestoneId == Some(None)) && + (t1.assignedUserName === filterUser("assigned").bind, filterUser.get("assigned").isDefined) && + (t1.openedUserName === filterUser("created_by").bind, filterUser.get("created_by").isDefined) && + (t1.openedUserName =!= filterUser("not_created_by").bind, filterUser.get("not_created_by").isDefined) && + (t1.pullRequest === true.bind, onlyPullRequest) && (IssueLabels filter { t2 => (t2.byIssue(t1.userName, t1.repositoryName, t1.issueId)) && (t2.labelId in diff --git a/src/main/scala/service/MilestonesService.scala b/src/main/scala/service/MilestonesService.scala index e9b27be..476e0c4 100644 --- a/src/main/scala/service/MilestonesService.scala +++ b/src/main/scala/service/MilestonesService.scala @@ -41,7 +41,7 @@ def getMilestonesWithIssueCount(owner: String, repository: String)(implicit s: Session): List[(Milestone, Int, Int)] = { val counts = Issues - .filter { t => (t.byRepository(owner, repository)) && (t.milestoneId isNotNull) } + .filter { t => (t.byRepository(owner, repository)) && (t.milestoneId.? isDefined) } .groupBy { t => t.milestoneId -> t.closed } .map { case (t1, t2) => t1._1 -> t1._2 -> t2.length } .toMap diff --git a/src/main/scala/service/PullRequestService.scala b/src/main/scala/service/PullRequestService.scala index 619f2fa..2129d07 100644 --- a/src/main/scala/service/PullRequestService.scala +++ b/src/main/scala/service/PullRequestService.scala @@ -26,9 +26,9 @@ PullRequests .innerJoin(Issues).on { (t1, t2) => t1.byPrimaryKey(t2.userName, t2.repositoryName, t2.issueId) } .filter { case (t1, t2) => - (t2.closed is closed.bind) && - (t1.userName is owner.get.bind, owner.isDefined) && - (t1.repositoryName is repository.get.bind, repository.isDefined) + (t2.closed === closed.bind) && + (t1.userName === owner.get.bind, owner.isDefined) && + (t1.repositoryName === repository.get.bind, repository.isDefined) } .groupBy { case (t1, t2) => t2.openedUserName } .map { case (userName, t) => userName -> t.length } @@ -55,10 +55,10 @@ PullRequests .innerJoin(Issues).on { (t1, t2) => t1.byPrimaryKey(t2.userName, t2.repositoryName, t2.issueId) } .filter { case (t1, t2) => - (t1.requestUserName is userName.bind) && - (t1.requestRepositoryName is repositoryName.bind) && - (t1.requestBranch is branch.bind) && - (t2.closed is closed.bind) + (t1.requestUserName === userName.bind) && + (t1.requestRepositoryName === repositoryName.bind) && + (t1.requestBranch === branch.bind) && + (t2.closed === closed.bind) } .map { case (t1, t2) => t1 } .list diff --git a/src/main/scala/service/RepositoryService.scala b/src/main/scala/service/RepositoryService.scala index 2adcca8..8e204a8 100644 --- a/src/main/scala/service/RepositoryService.scala +++ b/src/main/scala/service/RepositoryService.scala @@ -58,15 +58,15 @@ val collaborators = Collaborators.filter(_.byRepository(oldUserName, oldRepositoryName)).list Repositories.filter { t => - (t.originUserName is oldUserName.bind) && (t.originRepositoryName is oldRepositoryName.bind) + (t.originUserName === oldUserName.bind) && (t.originRepositoryName === oldRepositoryName.bind) }.map { t => t.originUserName -> t.originRepositoryName }.update(newUserName, newRepositoryName) Repositories.filter { t => - (t.parentUserName is oldUserName.bind) && (t.parentRepositoryName is oldRepositoryName.bind) + (t.parentUserName === oldUserName.bind) && (t.parentRepositoryName === oldRepositoryName.bind) }.map { t => t.originUserName -> t.originRepositoryName }.update(newUserName, newRepositoryName) PullRequests.filter { t => - t.requestRepositoryName is oldRepositoryName.bind + t.requestRepositoryName === oldRepositoryName.bind }.map { t => t.requestUserName -> t.requestRepositoryName }.update(newUserName, newRepositoryName) deleteRepository(oldUserName, oldRepositoryName) @@ -102,7 +102,7 @@ }.map { t => t.activityId -> t.message }.list updateActivities.foreach { case (activityId, message) => - Activities.filter(_.activityId is activityId.bind).map(_.message).update( + Activities.filter(_.activityId === activityId.bind).map(_.message).update( message .replace(s"[repo:${oldUserName}/${oldRepositoryName}]" ,s"[repo:${newUserName}/${newRepositoryName}]") .replace(s"[branch:${oldUserName}/${oldRepositoryName}#" ,s"[branch:${newUserName}/${newRepositoryName}#") @@ -136,7 +136,7 @@ * @return the list of repository names */ def getRepositoryNamesOfUser(userName: String)(implicit s: Session): List[String] = - Repositories filter(_.userName is userName.bind) map (_.repositoryName) list + Repositories filter(_.userName === userName.bind) map (_.repositoryName) list /** * Returns the specified repository information. @@ -150,7 +150,7 @@ (Repositories filter { t => t.byRepository(userName, repositoryName) } firstOption) map { repository => // for getting issue count and pull request count val issues = Issues.filter { t => - t.byRepository(repository.userName, repository.repositoryName) && (t.closed is false.bind) + t.byRepository(repository.userName, repository.repositoryName) && (t.closed === false.bind) }.map(_.pullRequest).list new RepositoryInfo( @@ -175,8 +175,8 @@ def getUserRepositories(userName: String, baseUrl: String, withoutPhysicalInfo: Boolean = false) (implicit s: Session): List[RepositoryInfo] = { Repositories.filter { t1 => - (t1.userName is userName.bind) || - (Collaborators.filter { t2 => t2.byRepository(t1.userName, t1.repositoryName) && (t2.collaboratorName is userName.bind)} exists) + (t1.userName === userName.bind) || + (Collaborators.filter { t2 => t2.byRepository(t1.userName, t1.repositoryName) && (t2.collaboratorName === userName.bind)} exists) }.sortBy(_.lastActivityDate desc).list.map{ repository => new RepositoryInfo( if(withoutPhysicalInfo){ @@ -212,13 +212,13 @@ case Some(x) if(x.isAdmin) => Repositories // for Normal Users case Some(x) if(!x.isAdmin) => - Repositories filter { t => (t.isPrivate is false.bind) || (t.userName is x.userName) || - (Collaborators.filter { t2 => t2.byRepository(t.userName, t.repositoryName) && (t2.collaboratorName is x.userName.bind)} exists) + Repositories filter { t => (t.isPrivate === false.bind) || (t.userName === x.userName) || + (Collaborators.filter { t2 => t2.byRepository(t.userName, t.repositoryName) && (t2.collaboratorName === x.userName.bind)} exists) } // for Guests - case None => Repositories filter(_.isPrivate is false.bind) + case None => Repositories filter(_.isPrivate === false.bind) }).filter { t => - repositoryUserName.map { userName => t.userName is userName.bind } getOrElse LiteralColumn(true) + repositoryUserName.map { userName => t.userName === userName.bind } getOrElse LiteralColumn(true) }.sortBy(_.lastActivityDate desc).list.map{ repository => new RepositoryInfo( if(withoutPhysicalInfo){ @@ -307,13 +307,13 @@ private def getForkedCount(userName: String, repositoryName: String)(implicit s: Session): Int = Query(Repositories.filter { t => - (t.originUserName is userName.bind) && (t.originRepositoryName is repositoryName.bind) + (t.originUserName === userName.bind) && (t.originRepositoryName === repositoryName.bind) }.length).first def getForkedRepositories(userName: String, repositoryName: String)(implicit s: Session): List[(String, String)] = Repositories.filter { t => - (t.originUserName is userName.bind) && (t.originRepositoryName is repositoryName.bind) + (t.originUserName === userName.bind) && (t.originRepositoryName === repositoryName.bind) } .sortBy(_.userName asc).map(t => t.userName -> t.repositoryName).list diff --git a/src/main/scala/service/SshKeyService.scala b/src/main/scala/service/SshKeyService.scala index 7d5b9aa..4446084 100644 --- a/src/main/scala/service/SshKeyService.scala +++ b/src/main/scala/service/SshKeyService.scala @@ -10,7 +10,7 @@ SshKeys insert SshKey(userName = userName, title = title, publicKey = publicKey) def getPublicKeys(userName: String)(implicit s: Session): List[SshKey] = - SshKeys.filter(_.userName is userName.bind).sortBy(_.sshKeyId).list + SshKeys.filter(_.userName === userName.bind).sortBy(_.sshKeyId).list def deletePublicKey(userName: String, sshKeyId: Int)(implicit s: Session): Unit = SshKeys filter (_.byPrimaryKey(userName, sshKeyId)) delete diff --git a/src/main/scala/service/WebHookService.scala b/src/main/scala/service/WebHookService.scala index 232eac1..a2dafbf 100644 --- a/src/main/scala/service/WebHookService.scala +++ b/src/main/scala/service/WebHookService.scala @@ -44,7 +44,7 @@ val httpClient = HttpClientBuilder.create.build webHookURLs.foreach { webHookUrl => - val f = future { + val f = Future { logger.debug(s"start web hook invocation for ${webHookUrl}") val httpPost = new HttpPost(webHookUrl.url) diff --git a/src/main/scala/util/Notifier.scala b/src/main/scala/util/Notifier.scala index ae6e25c..95ec6bf 100644 --- a/src/main/scala/util/Notifier.scala +++ b/src/main/scala/util/Notifier.scala @@ -69,7 +69,7 @@ (msg: String => String)(implicit context: Context) = { val database = Database(context.request.getServletContext) - val f = future { + val f = Future { database withSession { implicit session => getIssue(r.owner, r.name, issueId.toString) foreach { issue => defining(