Commit d74a18e7 authored by charlie ablett's avatar charlie ablett

Add link to MR when draft status changed

- update test
- update translations
parent 946dbc62
%p
= _('%{username} changed the draft status of merge request %{mr_reference}' % {username: sanitize_name(@updated_by_user.name), mr_reference: @merge_request.to_reference })
%p= html_escape(_('%{username} changed the draft status of merge request %{mr_link}')) % { username: link_to(@updated_by_user.name, user_url(@updated_by_user)),
mr_link: merge_request_reference_link(@merge_request) }
---
title: Add link to email notifying of MR changing draft status
merge_request: 61891
author:
type: changed
......@@ -978,6 +978,9 @@ msgstr ""
msgid "%{user_name} profile page"
msgstr ""
msgid "%{username} changed the draft status of merge request %{mr_link}"
msgstr ""
msgid "%{username} has asked for a GitLab account on your instance %{host}:"
msgstr ""
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe 'notify/change_in_merge_request_draft_status_email.html.haml' do
let(:user) { create(:user) }
let(:merge_request) { create(:merge_request) }
let(:merge_request_link) { merge_request_url(merge_request) }
before do
assign(:updated_by_user, user)
......@@ -15,5 +16,7 @@ RSpec.describe 'notify/change_in_merge_request_draft_status_email.html.haml' do
render
expect(rendered).to have_content("#{user.name} changed the draft status of merge request #{merge_request.to_reference}")
expect(rendered).to have_link(user.name, href: user_url(user))
expect(rendered).to have_link(merge_request.to_reference, href: merge_request_link)
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