Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
18231b0b
Commit
18231b0b
authored
Feb 02, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GitLab.com integration: refactoring
parent
7ddba92a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/importers/githubs_controller.rb
app/controllers/importers/githubs_controller.rb
+2
-2
app/workers/repository_import_worker.rb
app/workers/repository_import_worker.rb
+1
-1
lib/gitlab/github_import/client.rb
lib/gitlab/github_import/client.rb
+1
-1
lib/gitlab/github_import/importer.rb
lib/gitlab/github_import/importer.rb
+1
-1
lib/gitlab/github_import/project_creator.rb
lib/gitlab/github_import/project_creator.rb
+1
-1
No files found.
app/controllers/importers/githubs_controller.rb
View file @
18231b0b
...
...
@@ -47,13 +47,13 @@ class Importers::GithubsController < ApplicationController
namespace
.
add_owner
(
current_user
)
end
@project
=
Gitlab
::
Github
::
ProjectCreator
.
new
(
repo
,
namespace
,
current_user
).
execute
@project
=
Gitlab
::
Github
Import
::
ProjectCreator
.
new
(
repo
,
namespace
,
current_user
).
execute
end
private
def
client
@client
||=
Gitlab
::
Github
::
Client
.
new
.
client
@client
||=
Gitlab
::
Github
Import
::
Client
.
new
.
client
end
def
octo_client
...
...
app/workers/repository_import_worker.rb
View file @
18231b0b
...
...
@@ -11,7 +11,7 @@ class RepositoryImportWorker
project
.
import_url
)
if
project
.
import_type
==
'github'
result_of_data_import
=
Gitlab
::
Github
::
Importer
.
new
(
project
).
execute
result_of_data_import
=
Gitlab
::
Github
Import
::
Importer
.
new
(
project
).
execute
elsif
project
.
import_type
==
'gitlab'
result_of_data_import
=
Gitlab
::
GitlabImport
::
Importer
.
new
(
project
).
execute
else
...
...
lib/gitlab/github/client.rb
→
lib/gitlab/github
_import
/client.rb
View file @
18231b0b
module
Gitlab
module
Github
module
Github
Import
class
Client
attr_reader
:client
...
...
lib/gitlab/github/importer.rb
→
lib/gitlab/github
_import
/importer.rb
View file @
18231b0b
module
Gitlab
module
Github
module
Github
Import
class
Importer
attr_reader
:project
...
...
lib/gitlab/github/project_creator.rb
→
lib/gitlab/github
_import
/project_creator.rb
View file @
18231b0b
module
Gitlab
module
Github
module
Github
Import
class
ProjectCreator
attr_reader
:repo
,
:namespace
,
:current_user
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment