Commit 634c9f40 authored by Lin Jen-Shin's avatar Lin Jen-Shin

process_reply -> process_create_note; handle_reply -> process_reply

parent eac35833
...@@ -22,7 +22,7 @@ module Gitlab ...@@ -22,7 +22,7 @@ module Gitlab
raise EmptyEmailError if @raw.blank? raise EmptyEmailError if @raw.blank?
if sent_notification if sent_notification
process_reply process_create_note
elsif message_project elsif message_project
process_create_issue process_create_issue
...@@ -34,7 +34,7 @@ module Gitlab ...@@ -34,7 +34,7 @@ module Gitlab
end end
private private
def process_reply def process_create_note
raise AutoGeneratedEmailError if message.header.to_s =~ /auto-(generated|replied)/ raise AutoGeneratedEmailError if message.header.to_s =~ /auto-(generated|replied)/
author = sent_notification.recipient author = sent_notification.recipient
...@@ -44,7 +44,7 @@ module Gitlab ...@@ -44,7 +44,7 @@ module Gitlab
raise NoteableNotFoundError unless sent_notification.noteable raise NoteableNotFoundError unless sent_notification.noteable
reply = handle_reply(project) reply = process_reply(project)
raise EmptyEmailError if reply.blank? raise EmptyEmailError if reply.blank?
note = create_note(reply) note = create_note(reply)
...@@ -65,7 +65,7 @@ module Gitlab ...@@ -65,7 +65,7 @@ module Gitlab
message_project, message_project,
message_sender, message_sender,
title: message.subject, title: message.subject,
description: handle_reply(message_project) description: process_reply(message_project)
).execute ).execute
unless issue.persisted? unless issue.persisted?
...@@ -100,7 +100,7 @@ module Gitlab ...@@ -100,7 +100,7 @@ module Gitlab
Project.find_with_namespace(reply_key) if reply_key Project.find_with_namespace(reply_key) if reply_key
end end
def handle_reply(project) def process_reply(project)
reply = ReplyParser.new(message).execute.strip reply = ReplyParser.new(message).execute.strip
add_attachments(reply, project) add_attachments(reply, project)
......
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