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
b93a9734
Commit
b93a9734
authored
Dec 17, 2020
by
Savas Vedova
Committed by
Mayra Cabrera
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add confirmedBy field to vulnerability object in GraphQL
- Update documentation - Update schema - Add changelog
parent
e970bf06
Changes
6
Hide 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-confirmedBy-field.yml
ee/changelogs/unreleased/228740-add-confirmedBy-field.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 @
b93a9734
...
...
@@ -25046,6 +25046,11 @@ type Vulnerability implements Noteable {
"""
confirmedAt
:
Time
"""
The
user
that
confirmed
the
vulnerability
.
"""
confirmedBy
:
User
"""
Description
of
the
vulnerability
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
b93a9734
...
...
@@ -72961,6 +72961,20 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "confirmedBy",
"description": "The user that confirmed the vulnerability.",
"args": [
],
"type": {
"kind": "OBJECT",
"name": "User",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "description",
"description": "Description of the vulnerability",
doc/api/graphql/reference/index.md
View file @
b93a9734
...
...
@@ -3776,6 +3776,7 @@ Represents a vulnerability.
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`confirmedAt`
| Time | Timestamp of when the vulnerability state was changed to confirmed |
|
`confirmedBy`
| User | The user that confirmed the vulnerability. |
|
`description`
| String | Description of the vulnerability |
|
`detectedAt`
| Time! | Timestamp of when the vulnerability was first detected |
|
`discussions`
| DiscussionConnection! | All discussions on this noteable |
...
...
ee/app/graphql/types/vulnerability_type.rb
View file @
b93a9734
...
...
@@ -81,6 +81,13 @@ module Types
field
:merge_request
,
::
Types
::
MergeRequestType
,
null:
true
,
description:
'Merge request that fixes the vulnerability.'
field
:confirmed_by
,
::
Types
::
UserType
,
null:
true
,
description:
'The user that confirmed the vulnerability.'
def
confirmed_by
::
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
User
,
object
.
confirmed_by_id
).
find
end
def
user_notes_count
::
Gitlab
::
Graphql
::
Aggregations
::
Vulnerabilities
::
LazyUserNotesCountAggregate
.
new
(
context
,
object
)
end
...
...
ee/changelogs/unreleased/228740-add-confirmedBy-field.yml
0 → 100644
View file @
b93a9734
---
title
:
Add confirmedBy field to vulnerability object in GraphQL
merge_request
:
50144
author
:
type
:
changed
ee/spec/graphql/types/vulnerability_type_spec.rb
View file @
b93a9734
...
...
@@ -30,8 +30,9 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
notes
external_issue_links
has_solutions
discussions
merge_request
discussions
]
confirmed_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