From bdc06feb88cce201ca3272bbd6b988f0334b07dd Mon Sep 17 00:00:00 2001 From: takezoe Date: Tue, 3 Sep 2013 20:58:38 +0900 Subject: [PATCH] Fix a problem in pull request to branches other than the master branch. --- src/main/scala/app/PullRequestsController.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/app/PullRequestsController.scala b/src/main/scala/app/PullRequestsController.scala index add3cdad8..bad9b7ecd 100644 --- a/src/main/scala/app/PullRequestsController.scala +++ b/src/main/scala/app/PullRequestsController.scala @@ -100,7 +100,7 @@ trait PullRequestsControllerBase extends ControllerBase { getPullRequest(repository.owner, repository.name, issueId).map { case (issue, pullreq) => val remote = getRepositoryDir(repository.owner, repository.name) val tmpdir = new java.io.File(getTemporaryDir(repository.owner, repository.name), s"merge-${issueId}") - val git = Git.cloneRepository.setDirectory(tmpdir).setURI(remote.toURI.toString).call + val git = Git.cloneRepository.setDirectory(tmpdir).setURI(remote.toURI.toString).setBranch(pullreq.branch).call try { // mark issue as merged and close. @@ -179,7 +179,7 @@ trait PullRequestsControllerBase extends ControllerBase { FileUtils.deleteDirectory(tmpdir) } - val git = Git.cloneRepository.setDirectory(tmpdir).setURI(remote.toURI.toString).call + val git = Git.cloneRepository.setDirectory(tmpdir).setURI(remote.toURI.toString).setBranch(branch).call try { git.checkout.setName(branch).call