Commit c5b8592f authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-05-24

# Conflicts:
#	app/mailers/emails/merge_requests.rb
#	app/services/notification_service.rb
#	app/services/todo_service.rb

[ci skip]
parents cd352364 e97a8743
...@@ -64,6 +64,7 @@ module Emails ...@@ -64,6 +64,7 @@ module Emails
mail_answer_thread(@merge_request, merge_request_thread_options(@merge_request.author_id, recipient_id, reason)) mail_answer_thread(@merge_request, merge_request_thread_options(@merge_request.author_id, recipient_id, reason))
end end
<<<<<<< HEAD
def add_merge_request_approver_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil) def add_merge_request_approver_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
...@@ -85,6 +86,8 @@ module Emails ...@@ -85,6 +86,8 @@ module Emails
mail_answer_thread(@merge_request, merge_request_thread_options(unapproved_by_user_id, recipient_id, reason)) mail_answer_thread(@merge_request, merge_request_thread_options(unapproved_by_user_id, recipient_id, reason))
end end
=======
>>>>>>> upstream/master
def resolved_all_discussions_email(recipient_id, merge_request_id, resolved_by_user_id, reason = nil) def resolved_all_discussions_email(recipient_id, merge_request_id, resolved_by_user_id, reason = nil)
setup_merge_request_mail(merge_request_id, recipient_id) setup_merge_request_mail(merge_request_id, recipient_id)
......
...@@ -32,7 +32,7 @@ module ResolvableNote ...@@ -32,7 +32,7 @@ module ResolvableNote
# Keep this method in sync with the `potentially_resolvable` scope # Keep this method in sync with the `potentially_resolvable` scope
def potentially_resolvable? def potentially_resolvable?
RESOLVABLE_TYPES.include?(self.class.name) && noteable.supports_resolvable_notes? RESOLVABLE_TYPES.include?(self.class.name) && noteable&.supports_resolvable_notes?
end end
# Keep this method in sync with the `resolvable` scope # Keep this method in sync with the `resolvable` scope
......
...@@ -525,6 +525,7 @@ class NotificationService ...@@ -525,6 +525,7 @@ class NotificationService
end end
end end
<<<<<<< HEAD
def approve_mr_email(merge_request, project, current_user) def approve_mr_email(merge_request, project, current_user)
recipients = NotificationRecipientService.build_recipients(merge_request, current_user, action: 'approve') recipients = NotificationRecipientService.build_recipients(merge_request, current_user, action: 'approve')
...@@ -549,6 +550,8 @@ class NotificationService ...@@ -549,6 +550,8 @@ class NotificationService
end end
end end
=======
>>>>>>> upstream/master
def mailer def mailer
Notify Notify
end end
......
...@@ -104,6 +104,7 @@ class TodoService ...@@ -104,6 +104,7 @@ class TodoService
merge_request.merge_participants.each do |user| merge_request.merge_participants.each do |user|
create_build_failed_todo(merge_request, user) create_build_failed_todo(merge_request, user)
end end
<<<<<<< HEAD
end end
# When new approvers are added for a merge request: # When new approvers are added for a merge request:
...@@ -112,6 +113,8 @@ class TodoService ...@@ -112,6 +113,8 @@ class TodoService
# #
def add_merge_request_approvers(merge_request, approvers) def add_merge_request_approvers(merge_request, approvers)
create_approval_required_todos(merge_request, approvers, merge_request.author) create_approval_required_todos(merge_request, approvers, merge_request.author)
=======
>>>>>>> upstream/master
end end
# When a new commit is pushed to a merge request we should: # When a new commit is pushed to a merge request we should:
......
---
title: Fix resolvable check if note's commit could not be found.
merge_request:
author:
type: fixed
...@@ -326,4 +326,12 @@ describe Note, ResolvableNote do ...@@ -326,4 +326,12 @@ describe Note, ResolvableNote do
end end
end end
end end
describe "#potentially_resolvable?" do
it 'returns false if noteable could not be found' do
allow(subject).to receive(:noteable).and_return(nil)
expect(subject.potentially_resolvable?).to be_falsey
end
end
end end
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