Commit 25347834 authored by Harsh Chouraria's avatar Harsh Chouraria

Use instance variable for link

The merge request URL is pre-available as target_url
and is also used in the footer to link to the same destination

This change reuses that, as suggested by @vij
parent d25a8938
%p.details
= html_escape(_('%{userLinkStart}%{user}%{linkEnd} created a %{mrLinkStart}merge request%{linkEnd}:')) % {userLinkStart: "<a href=\"#{user_url(@merge_request.author)}\">".html_safe,
user: @merge_request.author_name,
mrLinkStart: "<a href=\"#{merge_request_url(@merge_request)}\">".html_safe,
mrLinkStart: "<a href=\"#{@target_url}\">".html_safe,
linkEnd: '</a>'.html_safe}
%p
......
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