Skip to content

Mailer: use custom header logo for merge request emails

Jonas Wälter requested to merge siemens/gitlab:mailers/use-header-logo into master

What does this MR do and why?

Email notifications are sent for various events. At the top of the email, the logo is placed - either the custom header logo (instance setting in admin area), or otherwise the GitLab logo. Unfortunately, the custom header logo is not considered in some emails.

This MR ensures that the custom header logo is also used for the following emails:

  • approved_merge_request_email
  • unapproved_merge_request_email
  • merge_when_pipeline_succeeds_email

🛠 with at Siemens

/cc @bufferoverflow

Screenshots

Email Before MR After MR (if custom header logo set)
approved_merge_request_email image image
unapproved_merge_request_email image image
merge_when_pipeline_succeeds_email image image

How to set up and validate locally

  1. Navigate to Mailer Previews: http://localhost:3000/rails/mailers
  2. View approved_merge_request_email preview: http://localhost:3000/rails/mailers/notify/approved_merge_request_email
  3. View unapproved_merge_request_email preview: http://localhost:3000/rails/mailers/notify/unapproved_merge_request_email
  4. View merge_when_pipeline_succeeds_email preview: http://localhost:3000/rails/mailers/notify/merge_when_pipeline_succeeds_email
  5. Sign in as administrator and navigate to Admin Area > Appearance > Navigation: http://localhost:3000/admin/application_settings/appearance
  6. Upload a custom Header logo.
  7. Refresh the Mailer Preview pages.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jonas Wälter

Merge request reports