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
28871d73
Commit
28871d73
authored
Jun 11, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GitHub Rake importer: Fail with a clearer explanation if GitLab username is wrong
parent
f646a8b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lib/tasks/import.rake
lib/tasks/import.rake
+4
-1
No files found.
lib/tasks/import.rake
View file @
28871d73
...
...
@@ -9,7 +9,10 @@ class GithubImport
def
initialize
(
token
,
gitlab_username
,
project_path
,
extras
)
@options
=
{
token:
token
}
@project_path
=
project_path
@current_user
=
User
.
find_by_username
(
gitlab_username
)
@current_user
=
User
.
find_by
(
username:
gitlab_username
)
raise
"GitLab user
#{
gitlab_username
}
not found. Please specify a valid username."
unless
@current_user
@github_repo
=
extras
.
empty?
?
nil
:
extras
.
first
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