Commit f9ec4a19 authored by Sean McGivern's avatar Sean McGivern

Revert incoming email patch for GitLab.com

parent 3d2e355d
......@@ -52,8 +52,6 @@ module Gitlab
private
def address_regex
return /^incoming\+(.+)@(incoming\.)?gitlab\.com$/ if Gitlab.com?
wildcard_address = config.address
return nil unless wildcard_address
......
......@@ -87,25 +87,6 @@ describe Gitlab::IncomingEmail do
it 'does not match emails with extra bits' do
expect(described_class.key_from_address('somereplies+somekey@example.com.someotherdomain.com')).to be nil
end
context "on GitLab.com" do
before do
allow(Gitlab).to receive(:com?).and_return(true)
end
it "returns the reply key when using @gitlab.com" do
expect(described_class.key_from_address("incoming+key@gitlab.com")).to eq("key")
end
it "returns the reply key when using @incoming.gitlab.com" do
expect(described_class.key_from_address("incoming+key@incoming.gitlab.com")).to eq("key")
end
it "does not match other addresses" do
expect(described_class.key_from_address("fooincoming+key@incoming.gitlab.com")).to be_nil
expect(described_class.key_from_address("incoming+key@incoming.gitlab.com.someotherdomain.com")).to be_nil
end
end
end
context 'self.key_from_fallback_message_id' do
......
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