mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
Add comments to issue.
This commit is contained in:
@@ -46,7 +46,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
|
||||
}
|
||||
|
||||
|
||||
@@ -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) =
|
||||
|
||||
Reference in New Issue
Block a user