summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-04-29 00:33:49 -0700
committerStan Hu <stanhu@gmail.com>2015-04-30 06:56:49 -0700
commit9c76a6fa96bd3c48dc1a64aecb082d4bd87dc2ba (patch)
tree9f566f5e900de491b2a382489e3eebdb567c224c /lib
parent39a55bdf1a1613f362bcd7da444b291210454160 (diff)
downloadgitlab-ce-9c76a6fa96bd3c48dc1a64aecb082d4bd87dc2ba.tar.gz
Show incompatible projects in Google Code import status
Importing a JSON file with only one Subversion project lead to confusion over whether the system was working. Provide status why these projects could not be imported directly. Closes #1531
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/google_code_import/client.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/google_code_import/client.rb b/lib/gitlab/google_code_import/client.rb
index 02f31e45f88..890bd9a3554 100644
--- a/lib/gitlab/google_code_import/client.rb
+++ b/lib/gitlab/google_code_import/client.rb
@@ -21,6 +21,10 @@ module Gitlab
@repos ||= raw_data["projects"].map { |raw_repo| GoogleCodeImport::Repository.new(raw_repo) }.select(&:git?)
end
+ def incompatible_repos
+ @incompatible_repos ||= raw_data["projects"].map { |raw_repo| GoogleCodeImport::Repository.new(raw_repo) }.reject(&:git?)
+ end
+
def repo(id)
repos.find { |repo| repo.id == id }
end