From 81995317f99550a0cd5c76e9b15fd91364665d1f Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Fri, 14 Jul 2017 13:40:04 -0300 Subject: Use project.import_url to fetch repositories from Github --- lib/tasks/import.rake | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/tasks') diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index 50b8e331469..75ccd7af793 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -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 -- cgit v1.2.1 From 51186e72c5b06e144960bd0caf9684dbc387920c Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Fri, 14 Jul 2017 13:43:25 -0300 Subject: Use a custom root endpoint if defined on GH ominiauth provider settings --- lib/tasks/import.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tasks') diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index 75ccd7af793..90792dfe51d 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 -- cgit v1.2.1 From 812620527ffee70ad2320eebcaec161a007b9d67 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Mon, 17 Jul 2017 20:20:13 -0300 Subject: Fix small typoe on GitHub import rake task --- lib/tasks/import.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tasks') diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index 90792dfe51d..96b8f59242c 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -62,7 +62,7 @@ class GithubImport visibility_level: visibility_level, import_type: 'github', import_source: @repo['full_name'], - import_url: @repo['clone_url'].sub('://', "://#{options[:token]}@"), + import_url: @repo['clone_url'].sub('://', "://#{@options[:token]}@"), skip_wiki: @repo['has_wiki'] ).execute end -- cgit v1.2.1