| |
---|
| | private def searchIssueQuery(repos: Seq[(String, String)], condition: IssueSearchCondition, pullRequest: Boolean)( |
---|
| | implicit s: Session |
---|
| | ) = |
---|
| | Issues filter { t1 => |
---|
| | repos |
---|
| | .map { case (owner, repository) => t1.byRepository(owner, repository) } |
---|
| | .foldLeft[Rep[Boolean]](false)(_ || _) && |
---|
| | (if (repos.size == 1) { |
---|
| | t1.byRepository(repos.head._1, repos.head._2) |
---|
| | } else { |
---|
| | ((t1.userName ++ "/" ++ t1.repositoryName) inSetBind (repos.map { case (owner, repo) => s"$owner/$repo" })) |
---|
| | }) && |
---|
| | (t1.closed === (condition.state == "closed").bind) && |
---|
| | (t1.milestoneId.? isEmpty, condition.milestone == Some(None)) && |
---|
| | (t1.priorityId.? isEmpty, condition.priority == Some(None)) && |
---|
| | (t1.assignedUserName.? isEmpty, condition.assigned == Some(None)) && |
---|
| |
---|
| | |