summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/models/concerns/importable.rb4
-rw-r--r--app/models/concerns/issuable.rb2
-rw-r--r--lib/gitlab/github_import/pull_request_formatter.rb2
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