diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-06-12 13:49:58 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-06-12 13:49:58 +0100 |
commit | 83ad5de637b884d97b3350a468b9a66c71507dca (patch) | |
tree | 6344200848b6da6b24a1fdbdb3cc2c4745ee6366 /lib/tasks/import.rake | |
parent | 7f5703484b957718d4f9f576cf8ac22acc45c8de (diff) | |
parent | d94b162129ed7d3131efe7822a4f0c6b4991fb8e (diff) | |
download | gitlab-ce-fl-eslint-vue-house-keeping.tar.gz |
Merge branch 'master' into fl-eslint-vue-house-keepingfl-eslint-vue-house-keeping
* master: (47 commits)
Bumping gitlab-gollum-lib and gitlab-gollum-rugged_adapter
i18n: document how to use links without splitting sentences
Resolve "[Rails5] `ActionView::MissingTemplate` in spec/features/projects/wiki/user_views_wiki_page_spec.rb"
Add CI job to check Gemfile.rails5.lock
Add navigation theme documentation
Move Gitaly branch/tag/ref RPC's to opt-out
Add CI_{PIPELINE,JOB}_URL
Resolve "Update docs as GKE cluster creation label has changed from "project ID" to "project""
fixed/enhanced command-line documentation
Use nip.io instead of xip.io
[Rails5] Update Gitlab.rails5.lock
Fix typo in doc/development/README.md
Update import screenshot without LFS warning
Hide overflow on hr
Resolve "Milestone and labels dropdowns are misplaced with collapsed sidebar"
Fix collapse sidebar button color
Remove .row and .col-sm-12
Relax expectation in spec/models/project_spec.rb
fix padding in commit info
GitHub Rake importer: Fail with a clearer explanation if GitLab username is wrong
...
Diffstat (limited to 'lib/tasks/import.rake')
-rw-r--r-- | lib/tasks/import.rake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/tasks/import.rake b/lib/tasks/import.rake index aafbe52e5f8..fc59b3f937d 100644 --- a/lib/tasks/import.rake +++ b/lib/tasks/import.rake @@ -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 @@ -50,7 +53,7 @@ class GithubImport end if import_success - @project.import_finish + @project.after_import puts "Import finished. Timings: #{timings}".color(:green) else puts "Import was not successful. Errors were as follows:" |