diff options
author | Stan Hu <stanhu@gmail.com> | 2019-03-19 20:07:05 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-03-19 21:23:00 +0300 |
commit | 1e6ea914a1affef8490ca15338c885c11d54e17f (patch) | |
tree | b362eef7241b3a19858bb814a2c1fc89d42efb3a /lib/gitlab/github_import | |
parent | 934253c9475a2f2d8a562bcc6bbb8a5f52efa713 (diff) |
GitHub import: Create new branches as project owner
This avoids permission errors when importing merge requests whose
authors don't have direct access to push to the main repository.
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 e294173f992..72451e5e01e 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(merge_request.author, source_branch, pull_request.source_branch_sha) + project.repository.add_branch(project.owner, source_branch, pull_request.source_branch_sha) rescue Gitlab::Git::CommandError => e Gitlab::Sentry.track_acceptable_exception(e, extra: { |