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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
c136edbb
Commit
c136edbb
authored
Mar 22, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gitlab import and spec
parent
8aafe685
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lib/gitlab/gitlab_import/importer.rb
lib/gitlab/gitlab_import/importer.rb
+7
-4
lib/gitlab/gitlab_import/project_creator.rb
lib/gitlab/gitlab_import/project_creator.rb
+0
-1
No files found.
lib/gitlab/gitlab_import/importer.rb
View file @
c136edbb
...
...
@@ -5,10 +5,13 @@ module Gitlab
def
initialize
(
project
)
@project
=
project
import_data
=
project
.
import_data
.
try
(
:data
)
gitlab_session
=
import_data
[
"gitlab_session"
]
if
import_data
@client
=
Client
.
new
(
gitlab_session
[
"gitlab_access_token"
])
@formatter
=
Gitlab
::
ImportFormatter
.
new
credentials
=
import_data
.
credentials
if
credentials
&&
credentials
[
"password"
]
@client
=
Client
.
new
(
credentials
[
"password"
])
@formatter
=
Gitlab
::
ImportFormatter
.
new
else
raise
Projects
::
ImportService
::
Error
,
"Unable to find project import data credentials for project ID:
#{
@project
.
id
}
"
end
end
def
execute
...
...
lib/gitlab/gitlab_import/project_creator.rb
View file @
c136edbb
...
...
@@ -23,7 +23,6 @@ module Gitlab
import_url:
repo
[
"http_url_to_repo"
].
sub
(
"://"
,
"://oauth2:
#{
@session_data
[
:gitlab_access_token
]
}
@"
)
).
execute
project
.
create_import_data
(
data:
{
"gitlab_session"
=>
session_data
}
)
project
end
end
...
...
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