mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #341)Fix compilation error other than date mapping and delete statement
This commit is contained in:
@@ -20,7 +20,7 @@ trait ActivityService {
|
||||
.take(30)
|
||||
.list
|
||||
|
||||
def getRecentActivities(implicit s: Session): List[Activity] =
|
||||
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 }
|
||||
|
||||
@@ -96,7 +96,7 @@ trait IssuesService {
|
||||
t.userName -> t.repositoryName
|
||||
}
|
||||
.map { case (repo, t) =>
|
||||
repo -> t.length
|
||||
(repo._1, repo._2, t.length)
|
||||
}
|
||||
.sortBy(_._3 desc)
|
||||
.list
|
||||
|
||||
@@ -8,15 +8,15 @@ import org.eclipse.jgit.revwalk.RevWalk
|
||||
import org.eclipse.jgit.treewalk.TreeWalk
|
||||
import org.eclipse.jgit.lib.FileMode
|
||||
import org.eclipse.jgit.api.Git
|
||||
import model.profile.simple.Session
|
||||
|
||||
trait
|
||||
RepositorySearchService { self: IssuesService =>
|
||||
trait RepositorySearchService { self: IssuesService =>
|
||||
import RepositorySearchService._
|
||||
|
||||
def countIssues(owner: String, repository: String, query: String): Int =
|
||||
def countIssues(owner: String, repository: String, query: String)(implicit session: Session): Int =
|
||||
searchIssuesByKeyword(owner, repository, query).length
|
||||
|
||||
def searchIssues(owner: String, repository: String, query: String): List[IssueSearchResult] =
|
||||
def searchIssues(owner: String, repository: String, query: String)(implicit session: Session): List[IssueSearchResult] =
|
||||
searchIssuesByKeyword(owner, repository, query).map { case (issue, commentCount, content) =>
|
||||
IssueSearchResult(
|
||||
issue.issueId,
|
||||
|
||||
@@ -194,7 +194,7 @@ trait RepositoryService { self: AccountService =>
|
||||
// for Guests
|
||||
case None => Repositories filter(_.isPrivate is false.bind)
|
||||
}).filter { t =>
|
||||
repositoryUserName.map { userName => t.userName is userName.bind } getOrElse ConstColumn.TRUE
|
||||
repositoryUserName.map { userName => t.userName is userName.bind } getOrElse LiteralColumn(true)
|
||||
}.sortBy(_.lastActivityDate desc).list.map{ repository =>
|
||||
new RepositoryInfo(
|
||||
JGitUtil.getRepositoryInfo(repository.userName, repository.repositoryName, baseUrl),
|
||||
|
||||
Reference in New Issue
Block a user