Commit 28871d73 authored by Stan Hu's avatar Stan Hu

GitHub Rake importer: Fail with a clearer explanation if GitLab username is wrong

parent f646a8b9
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment