diff options
author | James Lopez <james@jameslopez.es> | 2016-03-07 14:50:35 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-03-07 14:50:35 +0300 |
commit | 735563329d1f86ee4d72b37cd22eed1168935e8e (patch) | |
tree | 71f2354eeab407a06101dbf96696a72475d35727 /lib/gitlab/github_import | |
parent | 7085850c50a6dd7072bd2c80f092b0c20f74d1dc (diff) |
refactored a bunch of stuff based on MR feedback
Diffstat (limited to 'lib/gitlab/github_import')
-rw-r--r-- | lib/gitlab/github_import/importer.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/github_import/project_creator.rb | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb index 515fd4720d5..d478d3b5398 100644 --- a/lib/gitlab/github_import/importer.rb +++ b/lib/gitlab/github_import/importer.rb @@ -7,8 +7,8 @@ module Gitlab def initialize(project) @project = project - github_session = project.import_data.credentials if import_data - @client = Client.new(github_session["github_access_token"]) + credentials = project.import_data.credentials if import_data + @client = Client.new(credentials["github_access_token"]) @formatter = Gitlab::ImportFormatter.new end diff --git a/lib/gitlab/github_import/project_creator.rb b/lib/gitlab/github_import/project_creator.rb index b5ed32e5b1e..52aba93a51d 100644 --- a/lib/gitlab/github_import/project_creator.rb +++ b/lib/gitlab/github_import/project_creator.rb @@ -32,8 +32,7 @@ module Gitlab def create_import_data(project) project.create_import_data( - credentials: { github_access_token: session_data.delete(:github_access_token) }, - data: { github_session: session_data }) + credentials: { github_access_token: session_data.delete(:github_access_token) }) end end end |