debian-mirror-gitlab/lib/gitlab/email/handler.rb

19 lines
464 B
Ruby
Raw Normal View History

2016-09-13 17:45:13 +05:30
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