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
252f9b6d
Commit
252f9b6d
authored
Mar 23, 2022
by
Jiaan Louw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the compliance violations report not showing the merged by avatar
parent
98e8ece0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
ee/app/assets/javascripts/compliance_dashboard/graphql/mappers.js
...ssets/javascripts/compliance_dashboard/graphql/mappers.js
+3
-1
ee/spec/frontend/compliance_dashboard/graphql/mappers_spec.js
...pec/frontend/compliance_dashboard/graphql/mappers_spec.js
+2
-1
No files found.
ee/app/assets/javascripts/compliance_dashboard/graphql/mappers.js
View file @
252f9b6d
import
{
convertObjectPropsToSnakeCase
}
from
'
~/lib/utils/common_utils
'
;
export
const
mapViolations
=
(
nodes
=
[])
=>
{
return
nodes
.
map
((
node
)
=>
({
...
node
,
...
...
@@ -8,7 +10,7 @@ export const mapViolations = (nodes = []) => {
participants
:
node
.
mergeRequest
.
participants
?.
nodes
||
[],
// TODO: Once the legacy dashboard is removed (https://gitlab.com/gitlab-org/gitlab/-/issues/346266) we can update the drawer to use the new attributes and remove these 2 mappings
reference
:
node
.
mergeRequest
.
ref
,
mergedBy
:
node
.
mergeRequest
.
mergeUser
,
mergedBy
:
convertObjectPropsToSnakeCase
(
node
.
mergeRequest
.
mergeUser
)
,
project
:
{
...
node
.
mergeRequest
.
project
,
complianceFramework
:
node
.
mergeRequest
.
project
?.
complianceFrameworks
?.
nodes
[
0
]
||
null
,
...
...
ee/spec/frontend/compliance_dashboard/graphql/mappers_spec.js
View file @
252f9b6d
import
{
mapViolations
}
from
'
ee/compliance_dashboard/graphql/mappers
'
;
import
{
convertObjectPropsToSnakeCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
createComplianceViolation
}
from
'
../mock_data
'
;
describe
(
'
mapViolations
'
,
()
=>
{
...
...
@@ -7,7 +8,7 @@ describe('mapViolations', () => {
expect
(
mergeRequest
).
toMatchObject
({
reference
:
mergeRequest
.
ref
,
mergedBy
:
mergeRequest
.
mergeUser
,
mergedBy
:
convertObjectPropsToSnakeCase
(
mergeRequest
.
mergeUser
)
,
});
});
});
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