diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 02:29:35 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-23 18:31:56 +0300 |
commit | 3dadf306ddc81183e74b048bc4119796852ed7ea (patch) | |
tree | f01d5e7eb9c5550bc34a42d9e88479cd3fef578d /lib/gitlab/github_import | |
parent | 547063b3ac096dff25309b6e0846b0d5f417c128 (diff) |
Enable Style/DotPosition
Diffstat (limited to 'lib/gitlab/github_import')
-rw-r--r-- | lib/gitlab/github_import/importer.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/github_import/user_formatter.rb | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb index d95ff4fd104..a631425b3cf 100644 --- a/lib/gitlab/github_import/importer.rb +++ b/lib/gitlab/github_import/importer.rb @@ -178,9 +178,9 @@ module Gitlab def apply_labels(issuable, raw) return unless raw.labels.count > 0 - label_ids = raw.labels - .map { |attrs| @labels[attrs.name] } - .compact + label_ids = raw.labels. + map { |attrs| @labels[attrs.name] }. + compact issuable.update_attribute(:label_ids, label_ids) end diff --git a/lib/gitlab/github_import/user_formatter.rb b/lib/gitlab/github_import/user_formatter.rb index 04c2964da20..7f3bf0052a7 100644 --- a/lib/gitlab/github_import/user_formatter.rb +++ b/lib/gitlab/github_import/user_formatter.rb @@ -25,8 +25,8 @@ module Gitlab def find_by_email return nil unless email - User.find_by_any_email(email) - .try(:id) + User.find_by_any_email(email). + try(:id) end def find_by_external_uid @@ -34,11 +34,11 @@ module Gitlab identities = ::Identity.arel_table - User.select(:id) - .joins(:identities).where(identities[:provider].eq(:github) - .and(identities[:extern_uid].eq(id))) - .first - .try(:id) + User.select(:id). + joins(:identities).where(identities[:provider].eq(:github). + and(identities[:extern_uid].eq(id))). + first. + try(:id) end end end |