Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a4dc45e3
Commit
a4dc45e3
authored
Dec 02, 2021
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass formats explicitly when rendering .md file
Changelog: other EE: true
parent
d2f57e9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ee/app/services/merge_requests/create_from_vulnerability_data_service.rb
.../merge_requests/create_from_vulnerability_data_service.rb
+4
-2
No files found.
ee/app/services/merge_requests/create_from_vulnerability_data_service.rb
View file @
a4dc45e3
...
...
@@ -68,6 +68,7 @@ module MergeRequests
# This currently applies only the first diff
render_template
(
file:
'vulnerabilities/remediation'
,
formats: :patch
,
locals:
{
diff:
diffs
.
first
,
head_commit:
head_commit
,
...
...
@@ -80,12 +81,13 @@ module MergeRequests
def
render_description
(
vulnerability
)
render_template
(
file:
'vulnerabilities/merge_request_description'
,
formats: :md
,
locals:
{
vulnerability:
vulnerability
}
)
end
def
render_template
(
file
:,
locals
:)
A
ctionController
::
Base
.
new
.
render_to_string
(
template:
file
,
locals:
local
s
)
def
render_template
(
file
:,
locals
:
,
formats
:
)
A
pplicationController
.
render
(
template:
file
,
locals:
locals
,
formats:
format
s
)
end
def
can_create_merge_request?
(
source_branch
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment