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
9528d470
Commit
9528d470
authored
Dec 17, 2020
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dismissedBy field to vulnerability object in GraphQL
- Update documentation - Update schema - Add changelog
parent
12f8692c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
1 deletion
+34
-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
+14
-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
+7
-0
ee/changelogs/unreleased/228740-add-dismissed-by-field-to-graphql.yml
...s/unreleased/228740-add-dismissed-by-field-to-graphql.yml
+5
-0
ee/spec/graphql/types/vulnerability_type_spec.rb
ee/spec/graphql/types/vulnerability_type_spec.rb
+2
-1
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
9528d470
...
...
@@ -25747,6 +25747,11 @@ type Vulnerability implements Noteable {
"""
dismissedAt
:
Time
"""
The
user
that
dismissed
the
vulnerability
"""
dismissedBy
:
User
"""
List
of
external
issue
links
related
to
the
vulnerability
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
9528d470
...
...
@@ -74716,6 +74716,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "dismissedBy",
"description": "The user that dismissed the vulnerability",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "User",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "externalIssueLinks",
"description": "List of external issue links related to the vulnerability",
doc/api/graphql/reference/index.md
View file @
9528d470
...
...
@@ -3818,6 +3818,7 @@ Represents a vulnerability.
|
`detectedAt`
| Time! | Timestamp of when the vulnerability was first detected |
|
`discussions`
| DiscussionConnection! | All discussions on this noteable |
|
`dismissedAt`
| Time | Timestamp of when the vulnerability state was changed to dismissed |
|
`dismissedBy`
| User | The user that dismissed the vulnerability |
|
`externalIssueLinks`
| VulnerabilityExternalIssueLinkConnection! | List of external issue links related to the vulnerability |
|
`hasSolutions`
| Boolean | Indicates whether there is a solution available for this vulnerability. |
|
`id`
| ID! | GraphQL ID of the vulnerability |
...
...
ee/app/graphql/types/vulnerability_type.rb
View file @
9528d470
...
...
@@ -87,6 +87,9 @@ module Types
field
:resolved_by
,
::
Types
::
UserType
,
null:
true
,
description:
'The user that resolved the vulnerability.'
field
:dismissed_by
,
::
Types
::
UserType
,
null:
true
,
description:
'The user that dismissed the vulnerability.'
def
confirmed_by
::
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
User
,
object
.
confirmed_by_id
).
find
end
...
...
@@ -95,6 +98,10 @@ module Types
::
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
User
,
object
.
resolved_by_id
).
find
end
def
dismissed_by
::
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
User
,
object
.
dismissed_by_id
).
find
end
def
user_notes_count
::
Gitlab
::
Graphql
::
Aggregations
::
Vulnerabilities
::
LazyUserNotesCountAggregate
.
new
(
context
,
object
)
end
...
...
ee/changelogs/unreleased/228740-add-dismissed-by-field-to-graphql.yml
0 → 100644
View file @
9528d470
---
title
:
Add dismissedBy field to vulnerability object in GraphQL
merge_request
:
50285
author
:
type
:
changed
ee/spec/graphql/types/vulnerability_type_spec.rb
View file @
9528d470
...
...
@@ -33,7 +33,8 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
merge_request
discussions
confirmed_by
resolved_by]
resolved_by
dismissed_by]
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