diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 21:09:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-27 21:09:21 +0300 |
commit | e0fa0638a422c3e20d4423c9bb69d79afc9c7d3d (patch) | |
tree | 9abb3c0706576bbda895fe9539a55556930606e2 /lib/gitlab/incoming_email.rb | |
parent | f8d15ca65390475e356b06dedc51e10ccd179f86 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/incoming_email.rb')
-rw-r--r-- | lib/gitlab/incoming_email.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/incoming_email.rb b/lib/gitlab/incoming_email.rb index 4547a9b0a01..2889dbc68cc 100644 --- a/lib/gitlab/incoming_email.rb +++ b/lib/gitlab/incoming_email.rb @@ -28,8 +28,9 @@ module Gitlab config.address.sub(WILDCARD_PLACEHOLDER, "#{key}#{UNSUBSCRIBE_SUFFIX}") end - def key_from_address(address) - regex = address_regex + def key_from_address(address, wildcard_address: nil) + wildcard_address ||= config.address + regex = address_regex(wildcard_address) return unless regex match = address.match(regex) @@ -55,8 +56,7 @@ module Gitlab private - def address_regex - wildcard_address = config.address + def address_regex(wildcard_address) return unless wildcard_address regex = Regexp.escape(wildcard_address) |