Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.0 on 2022-01-18 at 14:00 UTC+1 (a few minutes of down time)

Commit ee843346 authored by Valery Sizov's avatar Valery Sizov
Browse files

Fix importing PRs with not existing branches

parent aab4b1fcdabd
......@@ -45,7 +45,7 @@ def refresh!
@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 @@ def import_pull_requests
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