Commit 4a0801b9 authored by Brett Walker's avatar Brett Walker

Fix already initialized constant constant warning

parent 496c6165
No related merge requests found
......@@ -3,8 +3,6 @@
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
......
......@@ -6,6 +6,8 @@ module Gitlab
class BaseHandler
attr_reader :mail, :mail_key
HANDLER_ACTION_BASE_REGEX ||= /(?<project_slug>.+)-(?<project_id>\d+)/.freeze
def initialize(mail, mail_key)
@mail = mail
@mail_key = mail_key
......
......@@ -11,7 +11,7 @@ module Gitlab
class CreateIssueHandler < BaseHandler
include ReplyProcessing
HANDLER_REGEX = /\A#{Gitlab::Email::Handler::HANDLER_ACTION_BASE_REGEX}-issue\z/.freeze
HANDLER_REGEX = /\A#{HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-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#{Gitlab::Email::Handler::HANDLER_ACTION_BASE_REGEX}-merge-request\z/.freeze
HANDLER_REGEX = /\A#{HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-merge-request\z/.freeze
HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\+merge-request\+(?<incoming_email_token>.*)/.freeze
def initialize(mail, mail_key)
......
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