diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/github_import/importer.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb index ecc28799737..bdabc71194d 100644 --- a/lib/gitlab/github_import/importer.rb +++ b/lib/gitlab/github_import/importer.rb @@ -59,6 +59,8 @@ module Gitlab end end end + + ensure_labels_are_cached end def import_milestones @@ -234,6 +236,14 @@ module Gitlab end end + def ensure_labels_are_cached + return unless @labels.empty? + + project.labels.select(:id, :title).find_each do |label| + @labels[label.title] = label.id + end + end + def fetch_resources(resource_type, *opts) return if imported?(resource_type) |