Commit ee843346 authored by Valery Sizov's avatar Valery Sizov

Fix importing PRs with not existing branches

parent 84f2c219
......@@ -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
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment