summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-08-07 19:27:42 +0000
committerRobert Speicher <robert@gitlab.com>2017-08-07 19:27:42 +0000
commitdd3d422193c5f8d11ca15d3dac2ac33e55736789 (patch)
treee278567403e6855e4913822bdc2781c1afc0649b /lib/tasks
parent4c8b666893aa9f5ab94b800489fd9e3240ad4f5e (diff)
parent38704e4247616a3122108b01b61798eed21461c9 (diff)
downloadgitlab-ce-dd3d422193c5f8d11ca15d3dac2ac33e55736789.tar.gz
Merge branch 'github' into 'master'
Improve GitHub importer Closes #27429 See merge request !12886
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/import.rake3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake
index 50b8e331469..96b8f59242c 100644
--- a/lib/tasks/import.rake
+++ b/lib/tasks/import.rake
@@ -7,7 +7,7 @@ class GithubImport
end
def initialize(token, gitlab_username, project_path, extras)
- @options = { url: 'https://api.github.com', token: token, verbose: true }
+ @options = { token: token, verbose: true }
@project_path = project_path
@current_user = User.find_by_username(gitlab_username)
@github_repo = extras.empty? ? nil : extras.first
@@ -62,6 +62,7 @@ class GithubImport
visibility_level: visibility_level,
import_type: 'github',
import_source: @repo['full_name'],
+ import_url: @repo['clone_url'].sub('://', "://#{@options[:token]}@"),
skip_wiki: @repo['has_wiki']
).execute
end