Add close and re-open of the issue.

This commit is contained in:
shimamoto
2013-07-01 21:05:52 +09:00
parent 56cec26c5b
commit 87d8a19e37
4 changed files with 31 additions and 4 deletions

View File

@@ -185,12 +185,12 @@ trait IssuesService {
} get
def createComment(owner: String, repository: String, loginUser: String,
issueId: Int, content: String) =
issueId: Int, content: String, action: Option[String]) =
IssueComments.autoInc insert (
owner,
repository,
issueId,
None,
action,
loginUser,
content,
currentDate,
@@ -213,6 +213,14 @@ trait IssuesService {
t.content ~ t.updatedDate
} update (content, currentDate)
def updateClosed(owner: String, repository: String, issueId: Int, closed: Boolean) =
Issues
.filter (_.byPrimaryKey(owner, repository, issueId))
.map { t =>
t.closed ~ t.updatedDate
}
.update (closed, currentDate)
}
object IssuesService {