2016-05-21 12:40:08 -04:00
|
|
|
require 'gitlab/email/handler/create_note_handler'
|
|
|
|
require 'gitlab/email/handler/create_issue_handler'
|
|
|
|
|
2016-05-18 18:19:25 -04:00
|
|
|
module Gitlab
|
|
|
|
module Email
|
2016-05-21 12:40:08 -04:00
|
|
|
module Handler
|
|
|
|
def self.for(mail, mail_key)
|
|
|
|
[CreateNoteHandler, CreateIssueHandler].find do |klass|
|
|
|
|
handler = klass.new(mail, mail_key)
|
|
|
|
break handler if handler.can_handle?
|
|
|
|
end
|
2016-05-18 18:19:25 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|