This commit is contained in:
takezoe
2013-06-25 13:55:13 +09:00
3 changed files with 26 additions and 4 deletions

View File

@@ -50,7 +50,10 @@ trait IssuesControllerBase extends ControllerBase {
val issueId = params("id")
getIssue(owner, repository, issueId) map {
issues.html.issue(_, getRepository(owner, repository, baseUrl).get)
issues.html.issue(
_,
getComment(owner, repository, issueId.toInt),
getRepository(owner, repository, baseUrl).get)
} getOrElse NotFound
}

View File

@@ -18,6 +18,13 @@ trait IssuesService {
} firstOption
else None
def getComment(owner: String, repository: String, issueId: Int) =
Query(IssueComments) filter { t =>
(t.userName is owner.bind) &&
(t.repositoryName is repository.bind) &&
(t.issueId is issueId.bind)
} list
def searchIssue(owner: String, repository: String,
// TODO It is better to have a DTO
closed: Boolean) =