Skip to content

Utilize show_diff_preview_in_email column

What does this MR do and why?

This merge request is the second of two MRs which follows up on !89150 (merged) which introduced the show_diff_preview_in_email column. This MR updates the project and namespace setting pages to allow for setting of that value. It also enhances the check for diff discussions in the creation of a note email. If this setting is turned off, diff previews will not be sent in the email and in it's place a message is printed to inform the user of the disabling.

GitLab issue: #24733 (closed)

Current status

Unblocked! All prerequisite merge requests have been merged:

Screenshots or screen recordings

Diffs No Diffs
image image
Project Setting Group Setting
image image

How to set up and validate locally in GDK

  1. Create a merge request with a code change.
  2. Create a comment on a line in the code change
  3. Use the LetterOpener to verify that the code snippet exists in the email
  4. Use the Rails console to turn the diff_preview_in_email flag to true
  5. Visit the Visibility, project features, permissions header of the General settings for the project( or at the group level) which contains the MR.
  6. Uncheck the box next to Include diff previews
  7. Create a new comment on a line in the MR
  8. Use LetterOpener to verify that the new email does not contain a code snippet

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 Miguel Rincon

Merge request reports