Skip to content
Snippets Groups Projects
Commit 634c9f40 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

process_reply -> process_create_note; handle_reply -> process_reply

parent eac35833
No related branches found
No related tags found
1 merge request!3363Implement #3243 New Issue by email
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
@@ -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)
 
Loading
Loading
@@ -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?
Loading
Loading
@@ -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)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment