(refs #2)Fix pull request. Basic pattern had been tested but it's still unstable.

This commit is contained in:
takezoe
2013-07-24 22:05:36 +09:00
parent 205119cc01
commit 88caff38f0
7 changed files with 120 additions and 82 deletions

View File

@@ -7,9 +7,9 @@ object PullRequests extends Table[PullRequest]("PULL_REQUEST") with IssueTemplat
def requestUserName = column[String]("REQUEST_USER_NAME")
def requestRepositoryName = column[String]("REQUEST_REPOSITORY_NAME")
def requestBranch = column[String]("REQUEST_BRANCH")
def mergeStartId = column[String]("MERGE_START_ID")
def mergeEndId = column[String]("MERGE_END_ID")
def * = userName ~ repositoryName ~ issueId ~ branch ~ requestUserName ~ requestRepositoryName ~ requestBranch ~ mergeStartId.? ~ mergeEndId.? <> (PullRequest, PullRequest.unapply _)
def commitIdFrom = column[String]("COMMIT_ID_FROM")
def commitIdTo = column[String]("COMMIT_ID_TO")
def * = userName ~ repositoryName ~ issueId ~ branch ~ requestUserName ~ requestRepositoryName ~ requestBranch ~ commitIdFrom ~ commitIdTo <> (PullRequest, PullRequest.unapply _)
def byPrimaryKey(userName: String, repositoryName: String, issueId: Int) = byIssue(userName, repositoryName, issueId)
def byPrimaryKey(userName: Column[String], repositoryName: Column[String], issueId: Column[Int]) = byIssue(userName, repositoryName, issueId)
@@ -23,5 +23,6 @@ case class PullRequest(
requestUserName: String,
requestRepositoryName: String,
requestBranch: String,
mergeStartId: Option[String],
mergeEndId: Option[String])
commitIdFrom: String,
commitIdTo: String
)