Commit 17a41d34 authored by Brett Walker's avatar Brett Walker

Fix already initialized constant constant warning

parent 0e33ab76
......@@ -10,7 +10,7 @@ module Gitlab
class ServiceDeskHandler < BaseHandler
include ReplyProcessing
HANDLER_REGEX = /\A#{::Gitlab::Email::Handler::BaseHandler::HANDLER_ACTION_BASE_REGEX}-issue-\z/.freeze
HANDLER_REGEX = /\A#{HANDLER_ACTION_BASE_REGEX}-issue-\z/.freeze
HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\z/.freeze
def initialize(mail, mail_key)
......
......@@ -6,7 +6,7 @@ module Gitlab
class BaseHandler
attr_reader :mail, :mail_key
HANDLER_ACTION_BASE_REGEX = /(?<project_slug>.+)-(?<project_id>\d+)/.freeze
HANDLER_ACTION_BASE_REGEX ||= /(?<project_slug>.+)-(?<project_id>\d+)/.freeze
def initialize(mail, mail_key)
@mail = mail
......
......@@ -11,7 +11,7 @@ module Gitlab
class CreateIssueHandler < BaseHandler
include ReplyProcessing
HANDLER_REGEX = /\A#{Gitlab::Email::Handler::BaseHandler::HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-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::BaseHandler::HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-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