diff options
author | Stan Hu <stanhu@gmail.com> | 2019-03-23 07:24:44 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-03-23 07:29:35 -0700 |
commit | d0336ae88f9ed7bfee1f74d8945e4f8770d0b9b0 (patch) | |
tree | 70f71ad03bed27ce243269b40d9e2fe63297eead /lib/gitlab/github_import | |
parent | 09d25b04c34398f9f825b3cc95265af3097fa035 (diff) | |
download | gitlab-ce-d0336ae88f9ed7bfee1f74d8945e4f8770d0b9b0.tar.gz |
GitHub importer: Use the project creator to create branches from forks
The project owner may actually be a group, in which case the branch
creation would fail due to a lack of username.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59396
Diffstat (limited to 'lib/gitlab/github_import')
-rw-r--r-- | lib/gitlab/github_import/importer/pull_request_importer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/github_import/importer/pull_request_importer.rb b/lib/gitlab/github_import/importer/pull_request_importer.rb index 72451e5e01e..1b293ddc7c7 100644 --- a/lib/gitlab/github_import/importer/pull_request_importer.rb +++ b/lib/gitlab/github_import/importer/pull_request_importer.rb @@ -89,7 +89,7 @@ module Gitlab return if project.repository.branch_exists?(source_branch) - project.repository.add_branch(project.owner, source_branch, pull_request.source_branch_sha) + project.repository.add_branch(project.creator, source_branch, pull_request.source_branch_sha) rescue Gitlab::Git::CommandError => e Gitlab::Sentry.track_acceptable_exception(e, extra: { |