Module: Emails::MergeRequests

Included in:
Notify
Defined in:
app/mailers/emails/merge_requests.rb

Instance Method Summary collapse

Instance Method Details

#closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) ⇒ Object


24
25
26
27
28
29
# File 'app/mailers/emails/merge_requests.rb', line 24

def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
  setup_merge_request_mail(merge_request_id, recipient_id)

  @updated_by = User.find(updated_by_user_id)
  mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
end

#merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id) ⇒ Object


37
38
39
40
41
42
43
# File 'app/mailers/emails/merge_requests.rb', line 37

def merge_request_status_email(recipient_id, merge_request_id, status, updated_by_user_id)
  setup_merge_request_mail(merge_request_id, recipient_id)

  @mr_status = status
  @updated_by = User.find(updated_by_user_id)
  mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
end

#merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) ⇒ Object


31
32
33
34
35
# File 'app/mailers/emails/merge_requests.rb', line 31

def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id)
  setup_merge_request_mail(merge_request_id, recipient_id)

  mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
end

#new_merge_request_email(recipient_id, merge_request_id) ⇒ Object


3
4
5
6
7
# File 'app/mailers/emails/merge_requests.rb', line 3

def new_merge_request_email(recipient_id, merge_request_id)
  setup_merge_request_mail(merge_request_id, recipient_id)

  mail_new_thread(@merge_request, merge_request_thread_options(@merge_request.author_id, recipient_id))
end

#reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id, updated_by_user_id) ⇒ Object


9
10
11
12
13
14
# File 'app/mailers/emails/merge_requests.rb', line 9

def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id, updated_by_user_id)
  setup_merge_request_mail(merge_request_id, recipient_id)

  @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id
  mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
end

#relabeled_merge_request_email(recipient_id, merge_request_id, label_names, updated_by_user_id) ⇒ Object


16
17
18
19
20
21
22
# File 'app/mailers/emails/merge_requests.rb', line 16

def relabeled_merge_request_email(recipient_id, merge_request_id, label_names, updated_by_user_id)
  setup_merge_request_mail(merge_request_id, recipient_id)

  @label_names = label_names
  @labels_url = namespace_project_labels_url(@project.namespace, @project)
  mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id))
end