diff options
Diffstat (limited to 'lib/gitlab/email/handler/service_desk_handler.rb')
-rw-r--r-- | lib/gitlab/email/handler/service_desk_handler.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/gitlab/email/handler/service_desk_handler.rb b/lib/gitlab/email/handler/service_desk_handler.rb index 05daa08530e..84b55079cea 100644 --- a/lib/gitlab/email/handler/service_desk_handler.rb +++ b/lib/gitlab/email/handler/service_desk_handler.rb @@ -42,18 +42,10 @@ module Gitlab end end - def metrics_params - super.merge(project: project&.full_path) - end - def metrics_event :receive_email_service_desk end - private - - attr_reader :project_id, :project_path, :service_desk_key - def project strong_memoize(:project) do @project = service_desk_key ? project_from_key : super @@ -62,6 +54,10 @@ module Gitlab end end + private + + attr_reader :project_id, :project_path, :service_desk_key + def project_from_key return unless match = service_desk_key.match(PROJECT_KEY_PATTERN) @@ -83,7 +79,8 @@ module Gitlab description: message_including_template, confidential: true, external_author: from_address - } + }, + spam_params: nil ).execute raise InvalidIssueError unless @issue.persisted? @@ -95,6 +92,7 @@ module Gitlab def send_thank_you_email Notify.service_desk_thank_you_email(@issue.id).deliver_later + Gitlab::Metrics::BackgroundTransaction.current&.add_event(:service_desk_thank_you_email) end def message_including_template |