Commit ab14be9a authored by Eugenia Grieff's avatar Eugenia Grieff

Add link to Merge request references in emails

parent 1dfba3bc
%p %p
Merge Request #{@merge_request.to_reference} was closed by #{sanitize_name(@updated_by.name)} Merge Request #{link_to(@merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request))} was closed by #{sanitize_name(@updated_by.name)}
%p %p
Merge Request #{@merge_request.to_reference} was #{@mr_status} by #{sanitize_name(@updated_by.name)} Merge Request #{link_to(@merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request))} was #{@mr_status} by #{sanitize_name(@updated_by.name)}
%p %p
You have been mentioned in Merge Request #{@merge_request.to_reference} You have been mentioned in Merge Request #{link_to(@merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request))}
= render template: 'notify/new_merge_request_email' = render template: 'notify/new_merge_request_email'
%p %p
All discussions on Merge Request #{@merge_request.to_reference} were resolved by #{sanitize_name(@resolved_by.name)} All discussions on Merge Request #{link_to(@merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request))} were resolved by #{sanitize_name(@resolved_by.name)}
---
title: Render Merge request reference as link in email templates
merge_request:
author:
type: changed
...@@ -467,6 +467,7 @@ describe Notify do ...@@ -467,6 +467,7 @@ describe Notify do
is_expected.to have_body_text(status) is_expected.to have_body_text(status)
is_expected.to have_body_text(current_user_sanitized) is_expected.to have_body_text(current_user_sanitized)
is_expected.to have_body_text(project_merge_request_path(project, merge_request)) is_expected.to have_body_text(project_merge_request_path(project, merge_request))
is_expected.to have_body_text(merge_request.to_reference(full: false))
end end
end end
end end
...@@ -534,6 +535,7 @@ describe Notify do ...@@ -534,6 +535,7 @@ describe Notify do
is_expected.to have_referable_subject(merge_request, reply: true) is_expected.to have_referable_subject(merge_request, reply: true)
is_expected.to have_body_text(project_merge_request_path(project, merge_request)) is_expected.to have_body_text(project_merge_request_path(project, merge_request))
is_expected.to have_body_text('due to conflict.') is_expected.to have_body_text('due to conflict.')
is_expected.to have_body_text(merge_request.to_reference(full: false))
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment