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
c7353cc9
Commit
c7353cc9
authored
May 26, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user_notes_count integer field to VulnerabilityType
parent
49e826af
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
1 deletion
+28
-1
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+5
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+18
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-0
ee/app/graphql/types/vulnerability_type.rb
ee/app/graphql/types/vulnerability_type.rb
+3
-0
ee/spec/graphql/types/vulnerability_type_spec.rb
ee/spec/graphql/types/vulnerability_type_spec.rb
+1
-1
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
c7353cc9
...
...
@@ -11600,6 +11600,11 @@ type Vulnerability {
"""
title
:
String
"""
Number
of
user
notes
attached
to
the
vulnerability
"""
userNotesCount
:
Int
!
"""
Permissions
for
the
current
user
on
the
resource
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
c7353cc9
...
...
@@ -34436,6 +34436,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "userNotesCount",
"description": "Number of user notes attached to the vulnerability",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "userPermissions",
"description": "Permissions for the current user on the resource",
doc/api/graphql/reference/index.md
View file @
c7353cc9
...
...
@@ -1763,6 +1763,7 @@ Represents a vulnerability.
|
`severity`
| VulnerabilitySeverity | Severity of the vulnerability (INFO, UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL) |
|
`state`
| VulnerabilityState | State of the vulnerability (DETECTED, DISMISSED, RESOLVED, CONFIRMED) |
|
`title`
| String | Title of the vulnerability |
|
`userNotesCount`
| Int! | Number of user notes attached to the vulnerability |
|
`userPermissions`
| VulnerabilityPermissions! | Permissions for the current user on the resource |
|
`vulnerabilityPath`
| String | URL to the vulnerability's details page |
...
...
ee/app/graphql/types/vulnerability_type.rb
View file @
c7353cc9
...
...
@@ -27,6 +27,9 @@ module Types
field
:report_type
,
VulnerabilityReportTypeEnum
,
null:
true
,
description:
"Type of the security report that found the vulnerability (
#{
::
Vulnerabilities
::
Occurrence
::
REPORT_TYPES
.
keys
.
join
(
', '
).
upcase
}
)"
field
:user_notes_count
,
GraphQL
::
INT_TYPE
,
null:
false
,
description:
'Number of user notes attached to the vulnerability'
field
:vulnerability_path
,
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
"URL to the vulnerability's details page"
,
resolve:
->
(
obj
,
_args
,
_ctx
)
{
::
Gitlab
::
Routing
.
url_helpers
.
project_security_vulnerability_path
(
obj
.
project
,
obj
)
}
...
...
ee/spec/graphql/types/vulnerability_type_spec.rb
View file @
c7353cc9
...
...
@@ -8,7 +8,7 @@ describe GitlabSchema.types['Vulnerability'] do
let_it_be
(
:vulnerability
)
{
create
(
:vulnerability
,
project:
project
)
}
let
(
:fields
)
do
%i[userPermissions id title description state severity report_type vulnerability_path location project]
%i[userPermissions id title description
user_notes_count
state severity report_type vulnerability_path location project]
end
before
do
...
...
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