Commit 9d17ce42 authored by Jonathan Schafer's avatar Jonathan Schafer

Move source_branch to pipeline_json

parent 070005ef
......@@ -14,7 +14,6 @@ module VulnerabilitiesHelper
has_mr: !!vulnerability.finding.merge_request_feedback.try(:merge_request_iid),
vulnerability_feedback_help_path: help_page_path('user/application_security/index', anchor: 'interacting-with-the-vulnerabilities'),
finding_json: vulnerability_finding_data(vulnerability.finding).to_json,
source_branch: pipeline&.ref.to_s,
create_mr_url: create_vulnerability_feedback_merge_request_path(vulnerability.finding.project),
timestamp: Time.now.to_i
}
......@@ -26,7 +25,8 @@ module VulnerabilitiesHelper
{
id: pipeline.id,
created_at: pipeline.created_at.iso8601,
url: pipeline_path(pipeline)
url: pipeline_path(pipeline),
source_branch: pipeline.ref
}
end
......
......@@ -65,7 +65,6 @@ describe VulnerabilitiesHelper do
has_mr: anything,
vulnerability_feedback_help_path: kind_of(String),
finding_json: kind_of(String),
source_branch: kind_of(String),
create_mr_url: "/#{project.full_path}/-/vulnerability_feedback",
timestamp: Time.now.to_i
)
......@@ -85,7 +84,8 @@ describe VulnerabilitiesHelper do
expect(pipelineData).to include(
'id' => pipeline.id,
'created_at' => pipeline.created_at.iso8601,
'url' => be_present
'url' => be_present,
'source_branch' => pipeline.ref
)
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