Commit 496c6165 authored by Brett Walker's avatar Brett Walker

Move constant definition

parent a4f2de79
......@@ -3,6 +3,8 @@
module Gitlab
module Email
module Handler
HANDLER_ACTION_BASE_REGEX = /(?<project_slug>.+)-(?<project_id>\d+)-(?<incoming_email_token>.+)/.freeze
def self.handlers
@handlers ||= load_handlers
end
......
......@@ -11,7 +11,7 @@ module Gitlab
class CreateIssueHandler < BaseHandler
include ReplyProcessing
HANDLER_REGEX = /\A#{HANDLER_ACTION_BASE_REGEX}-issue\z/.freeze
HANDLER_REGEX = /\A#{Gitlab::Email::Handler::HANDLER_ACTION_BASE_REGEX}-issue\z/.freeze
HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\+(?<incoming_email_token>.*)\z/.freeze
def initialize(mail, mail_key)
......
......@@ -12,7 +12,7 @@ module Gitlab
class CreateMergeRequestHandler < BaseHandler
include ReplyProcessing
HANDLER_REGEX = /\A#{HANDLER_ACTION_BASE_REGEX}-merge-request\z/.freeze
HANDLER_REGEX = /\A#{Gitlab::Email::Handler::HANDLER_ACTION_BASE_REGEX}-merge-request\z/.freeze
HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\+merge-request\+(?<incoming_email_token>.*)/.freeze
def initialize(mail, mail_key)
......
......@@ -6,8 +6,6 @@ module Gitlab
module ReplyProcessing
private
HANDLER_ACTION_BASE_REGEX = /(?<project_slug>.+)-(?<project_id>\d+)-(?<incoming_email_token>.+)/.freeze
attr_reader :project_id, :project_slug, :project_path, :incoming_email_token
def author
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment