Fetch pull request from source repository after updating repository.

This commit is contained in:
odz
2013-11-20 23:59:26 +09:00
parent f38924c7fe
commit 223ba791fe
4 changed files with 42 additions and 18 deletions

View File

@@ -46,6 +46,13 @@ trait PullRequestService { self: IssuesService =>
commitIdFrom,
commitIdTo))
def getPullRequestsByRequest(userName: String, repositoryName: String, branch: String, closed: Boolean): List[PullRequest] =
Query(PullRequests)
.innerJoin(Issues).on { (t1, t2) => t1.byPrimaryKey(t2.userName, t2.repositoryName, t2.issueId) }
.filter { case (t1, t2) => t1.byRequestBranch(userName, repositoryName, branch) && t2.closed is closed.bind }
.map { case (t1, t2) => t1 }
.list
}
object PullRequestService {