diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-06 17:12:11 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-06 17:12:11 +0200 |
commit | ee8433466ee77c1da026842e965b32ebefab6f13 (patch) | |
tree | 5e0506c53bb1ef2c231318e6d1f692403b54aaab | |
parent | 84f2c219aa33de4890c7681372dd03309f216795 (diff) | |
download | gitlab-ce-ee8433466ee77c1da026842e965b32ebefab6f13.tar.gz |
Fix importing PRs with not existing branches
-rw-r--r-- | lib/bitbucket/connection.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/bitbucket_import/importer.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bitbucket/connection.rb b/lib/bitbucket/connection.rb index c375fe16aee..e28285f119c 100644 --- a/lib/bitbucket/connection.rb +++ b/lib/bitbucket/connection.rb @@ -45,7 +45,7 @@ module Bitbucket @expires_at = response.expires_at @expires_in = response.expires_in @refresh_token = response.refresh_token - @connection = nil + @connection = nil end private diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb index 6438c8a52e4..34d93542955 100644 --- a/lib/gitlab/bitbucket_import/importer.rb +++ b/lib/gitlab/bitbucket_import/importer.rb @@ -81,10 +81,10 @@ module Gitlab description: description, source_project: project, source_branch: pull_request.source_branch_name, - source_branch_sha: project.repository.rugged.lookup(pull_request.source_branch_sha).oid, + source_branch_sha: pull_request.source_branch_sha, target_project: project, target_branch: pull_request.target_branch_name, - target_branch_sha: project.repository.rugged.lookup(pull_request.target_branch_sha).oid, + target_branch_sha: pull_request.target_branch_sha, state: pull_request.state, author_id: gitlab_user_id(project, pull_request.author), assignee_id: nil, |