diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb index b8065580b54139c49a7e167d99eba3e8c8d2f12a..e02554eb47305a0e31a335b4a84371af70426e02 100644 --- a/lib/gitlab/email/receiver.rb +++ b/lib/gitlab/email/receiver.rb @@ -22,7 +22,7 @@ module Gitlab raise EmptyEmailError if @raw.blank? if sent_notification - process_reply + process_create_note elsif message_project process_create_issue @@ -34,7 +34,7 @@ module Gitlab end private - def process_reply + def process_create_note raise AutoGeneratedEmailError if message.header.to_s =~ /auto-(generated|replied)/ author = sent_notification.recipient @@ -44,7 +44,7 @@ module Gitlab raise NoteableNotFoundError unless sent_notification.noteable - reply = handle_reply(project) + reply = process_reply(project) raise EmptyEmailError if reply.blank? note = create_note(reply) @@ -65,7 +65,7 @@ module Gitlab message_project, message_sender, title: message.subject, - description: handle_reply(message_project) + description: process_reply(message_project) ).execute unless issue.persisted? @@ -100,7 +100,7 @@ module Gitlab Project.find_with_namespace(reply_key) if reply_key end - def handle_reply(project) + def process_reply(project) reply = ReplyParser.new(message).execute.strip add_attachments(reply, project)