(refs #324)Update commitIdFrom when pullrequest branch is updated

This commit is contained in:
Tomofumi Tanaka
2014-04-29 16:57:01 +09:00
parent 1900aefe32
commit dd694d27b5
4 changed files with 25 additions and 15 deletions

View File

@@ -18,6 +18,9 @@ trait PullRequestService { self: IssuesService =>
def updateCommitIdTo(owner: String, repository: String, issueId: Int, commitIdTo: String): Unit =
Query(PullRequests).filter(_.byPrimaryKey(owner, repository, issueId)).map(_.commitIdTo).update(commitIdTo)
def updateCommitIdFrom(owner: String, repository: String, issueId: Int, commitIdFrom: String): Unit =
Query(PullRequests).filter(_.byPrimaryKey(owner, repository, issueId)).map(_.commitIdFrom).update(commitIdFrom)
def getPullRequestCountGroupByUser(closed: Boolean, owner: String, repository: Option[String]): List[PullRequestCount] =
Query(PullRequests)
.innerJoin(Issues).on { (t1, t2) => t1.byPrimaryKey(t2.userName, t2.repositoryName, t2.issueId) }