Commit 548a50d1 authored by Jonathan Schafer's avatar Jonathan Schafer

Finding uses latest sha, not default branch

parent 00cf6243
......@@ -31,11 +31,12 @@
%li
- link_text = _("%{file}") % { file: location['file'] }
- offset = _('')
- branch = _("%{branch}") % { branch: @vulnerability.finding.pipelines&.last&.sha || @vulnerability.project.default_branch }
- if location['start_line']
- link_text = _("%{link_text}:%{line}") % { link_text: link_text, line: location['start_line'] }
- offset = _("#L%{start_line}") % { start_line: location['start_line'] }
= _('File:')
%a{ href: project_blob_path(@project, tree_join(@vulnerability.project.default_branch, location['file'])) + offset,
%a{ href: project_blob_path(@project, tree_join(branch, location['file'])) + offset,
target: '_blank', rel: 'noopener noreferrer' }= link_text
- if location['class']
%li= _("Class: %{className}") % { className: location['class'] }
......
......@@ -228,6 +228,9 @@ msgstr ""
msgid "%{authorsName}'s thread"
msgstr ""
msgid "%{branch}"
msgstr ""
msgid "%{commit_author_link} authored %{commit_timeago}"
msgstr ""
......
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