Welcome to mirror list, hosted at ThFree Co, Russian Federation.

handler.rb « email « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5cf9d5ebe28d67be964a8fc4cd9beac8e106dac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'gitlab/email/handler/create_note_handler'
require 'gitlab/email/handler/create_issue_handler'

module Gitlab
  module Email
    module Handler
      # The `CreateIssueHandler` feature is disabled for the time being.
      HANDLERS = [CreateNoteHandler]

      def self.for(mail, mail_key)
        HANDLERS.find do |klass|
          handler = klass.new(mail, mail_key)
          break handler if handler.can_handle?
        end
      end
    end
  end
end