diff options
Diffstat (limited to 'app/mailers/emails')
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 8 | ||||
-rw-r--r-- | app/mailers/emails/pipelines.rb | 2 | ||||
-rw-r--r-- | app/mailers/emails/profile.rb | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index 494d9875ce4..e538b5e4718 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -23,6 +23,14 @@ module Emails mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id, reason)) end + def change_in_merge_request_draft_status_email(recipient_id, merge_request_id, updated_by_user_id, reason = nil) + setup_merge_request_mail(merge_request_id, recipient_id) + + @updated_by_user = User.find(updated_by_user_id) + + mail_answer_thread(@merge_request, merge_request_thread_options(updated_by_user_id, recipient_id, reason)) + end + # rubocop: disable CodeReuse/ActiveRecord def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_ids, updated_by_user_id, reason = nil) setup_merge_request_mail(merge_request_id, recipient_id) diff --git a/app/mailers/emails/pipelines.rb b/app/mailers/emails/pipelines.rb index 0b830f4ee5e..fb1f70723fd 100644 --- a/app/mailers/emails/pipelines.rb +++ b/app/mailers/emails/pipelines.rb @@ -3,7 +3,7 @@ module Emails module Pipelines def pipeline_success_email(pipeline, recipients) - pipeline_mail(pipeline, recipients, 'Succesful') + pipeline_mail(pipeline, recipients, 'Successful') end def pipeline_failed_email(pipeline, recipients) diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index e3c72a343e7..f13ba9caee0 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -50,15 +50,16 @@ module Emails end # rubocop: enable CodeReuse/ActiveRecord - def access_token_about_to_expire_email(user) + def access_token_about_to_expire_email(user, token_names) return unless user @user = user + @token_names = token_names @target_url = profile_personal_access_tokens_url @days_to_expire = PersonalAccessToken::DAYS_TO_EXPIRE Gitlab::I18n.with_locale(@user.preferred_language) do - mail(to: @user.notification_email, subject: subject(_("Your Personal Access Tokens will expire in %{days_to_expire} days or less") % { days_to_expire: @days_to_expire })) + mail(to: @user.notification_email, subject: subject(_("Your personal access tokens will expire in %{days_to_expire} days or less") % { days_to_expire: @days_to_expire })) end end |