diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-03 14:31:48 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-04-03 15:50:22 -0300 |
commit | a6affc66dc93e178f6f96a84fae5a481c1a9803a (patch) | |
tree | c49316ec00bcbcdeae0fe9ff13a69e9a5323afe9 | |
parent | 0b7d10fb2dd3470a8328133f3273ad9d499e3af2 (diff) | |
download | gitlab-ce-a6affc66dc93e178f6f96a84fae5a481c1a9803a.tar.gz |
Rename skip_metrics to imported on the importable concern
-rw-r--r-- | app/models/concerns/importable.rb | 4 | ||||
-rw-r--r-- | app/models/concerns/issuable.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/github_import/pull_request_formatter.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/concerns/importable.rb b/app/models/concerns/importable.rb index 8bce1c1766b..c9331eaf4cc 100644 --- a/app/models/concerns/importable.rb +++ b/app/models/concerns/importable.rb @@ -4,6 +4,6 @@ module Importable attr_accessor :importing alias_method :importing?, :importing - attr_accessor :skip_metrics - alias_method :skip_metrics?, :skip_metrics + attr_accessor :imported + alias_method :imported?, :imported end diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 863b43cec76..b4dded7e27e 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -100,7 +100,7 @@ module Issuable acts_as_paranoid after_save :update_assignee_cache_counts, if: :assignee_id_changed? - after_save :record_metrics, unless: :skip_metrics? + after_save :record_metrics, unless: :imported? def update_assignee_cache_counts # make sure we flush the cache for both the old *and* new assignees(if they exist) diff --git a/lib/gitlab/github_import/pull_request_formatter.rb b/lib/gitlab/github_import/pull_request_formatter.rb index b347e0b0feb..150afa31432 100644 --- a/lib/gitlab/github_import/pull_request_formatter.rb +++ b/lib/gitlab/github_import/pull_request_formatter.rb @@ -21,7 +21,7 @@ module Gitlab assignee_id: assignee_id, created_at: raw_data.created_at, updated_at: raw_data.updated_at, - skip_metrics: true + imported: true } end |