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:
- Migrate emails_disabled column to emails_enabled (!93005 - merged)
- Add finalization migration for emails_enabled (!112201 - merged)
- Update backend for namespaces for emails_enabled (!127899 - merged)
- Switch Groups UX to emails_enabled (!135959 - merged)
Screenshots or screen recordings
Diffs | No Diffs |
---|---|
Project Setting | Group Setting |
---|---|
How to set up and validate locally in GDK
- Create a merge request with a code change.
- Create a comment on a line in the code change
- Use the LetterOpener to verify that the code snippet exists in the email
- Use the Rails console to turn the
diff_preview_in_email
flag totrue
- Visit the
Visibility, project features, permissions
header of theGeneral
settings for the project( or at the group level) which contains the MR. - Uncheck the box next to
Include diff previews
- Create a new comment on a line in the MR
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Miguel Rincon