mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #374) Fix compile error.
This commit is contained in:
@@ -75,10 +75,10 @@ trait AccountService {
|
||||
}
|
||||
|
||||
def getAccountByUserName(userName: String, includeRemoved: Boolean = false)(implicit s: Session): Option[Account] =
|
||||
Accounts filter(t => (t.userName === 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 === 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){
|
||||
|
||||
@@ -168,7 +168,7 @@ trait IssuesService {
|
||||
.foldLeft[Column[Boolean]](false) ( _ || _ ) &&
|
||||
(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.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) &&
|
||||
|
||||
@@ -41,7 +41,7 @@ trait MilestonesService {
|
||||
|
||||
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
|
||||
|
||||
@@ -102,7 +102,7 @@ trait RepositoryService { self: AccountService =>
|
||||
}.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}#")
|
||||
|
||||
@@ -44,7 +44,7 @@ trait WebHookService {
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user