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
1
Merge Requests
1
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
nexedi
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
...
@@ -5,10 +5,13 @@ module Gitlab
def
initialize
(
project
)
def
initialize
(
project
)
@project
=
project
@project
=
project
import_data
=
project
.
import_data
.
try
(
:data
)
credentials
=
import_data
.
credentials
gitlab_session
=
import_data
[
"gitlab_session"
]
if
import_data
if
credentials
&&
credentials
[
"password"
]
@client
=
Client
.
new
(
gitlab_session
[
"gitlab_access_token"
])
@client
=
Client
.
new
(
credentials
[
"password"
])
@formatter
=
Gitlab
::
ImportFormatter
.
new
@formatter
=
Gitlab
::
ImportFormatter
.
new
else
raise
Projects
::
ImportService
::
Error
,
"Unable to find project import data credentials for project ID:
#{
@project
.
id
}
"
end
end
end
def
execute
def
execute
...
...
lib/gitlab/gitlab_import/project_creator.rb
View file @
c136edbb
...
@@ -23,7 +23,6 @@ module Gitlab
...
@@ -23,7 +23,6 @@ module Gitlab
import_url:
repo
[
"http_url_to_repo"
].
sub
(
"://"
,
"://oauth2:
#{
@session_data
[
:gitlab_access_token
]
}
@"
)
import_url:
repo
[
"http_url_to_repo"
].
sub
(
"://"
,
"://oauth2:
#{
@session_data
[
:gitlab_access_token
]
}
@"
)
).
execute
).
execute
project
.
create_import_data
(
data:
{
"gitlab_session"
=>
session_data
}
)
project
project
end
end
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