Use message_id_regexp variable for the regexp

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8620#note_22021001
This commit is contained in:
Lin Jen-Shin 2017-02-03 17:29:08 +08:00
parent 0786894473
commit f30e2a6ec7

View file

@ -35,7 +35,9 @@ module Gitlab
end
def key_from_fallback_message_id(mail_id)
mail_id[/\Areply\-(.+)@#{Gitlab.config.gitlab.host}\z/, 1]
message_id_regexp = /\Areply\-(.+)@#{Gitlab.config.gitlab.host}\z/
mail_id[message_id_regexp, 1]
end
def scan_fallback_references(references)