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
00850566
Commit
00850566
authored
Jan 29, 2021
by
Tetiana Chupryna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bot to User type
Add check in GraphQL endpoint if user is a bot
parent
610d4f34
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
0 deletions
+33
-0
app/graphql/types/user_type.rb
app/graphql/types/user_type.rb
+3
-0
changelogs/unreleased/267140-add-user-bot-gql.yml
changelogs/unreleased/267140-add-user-bot-gql.yml
+5
-0
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
spec/graphql/types/user_type_spec.rb
spec/graphql/types/user_type_spec.rb
+1
-0
No files found.
app/graphql/types/user_type.rb
View file @
00850566
...
...
@@ -12,6 +12,9 @@ module Types
field
:id
,
GraphQL
::
ID_TYPE
,
null:
false
,
description:
'ID of the user.'
field
:bot
,
GraphQL
::
BOOLEAN_TYPE
,
null:
false
,
description:
'Indicates if the user is a bot.'
,
method: :bot?
field
:username
,
GraphQL
::
STRING_TYPE
,
null:
false
,
description:
'Username of the user. Unique within this instance of GitLab.'
field
:name
,
GraphQL
::
STRING_TYPE
,
null:
false
,
...
...
changelogs/unreleased/267140-add-user-bot-gql.yml
0 → 100644
View file @
00850566
---
title
:
Add bot to User GraphQL Type
merge_request
:
52933
author
:
type
:
added
doc/api/graphql/reference/gitlab_schema.graphql
View file @
00850566
...
...
@@ -26980,6 +26980,11 @@ type User {
"""
avatarUrl
:
String
"""
Indicates
if
the
user
is
a
bot
.
"""
bot
:
Boolean
!
"""
User
email
.
Deprecated
in
13.7
:
Use
public_email
.
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
00850566
...
...
@@ -77620,6 +77620,24 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "bot",
"description": "Indicates if the user is a bot.",
"args": [
],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "email",
"description": "User email. Deprecated in 13.7: Use public_email.",
doc/api/graphql/reference/index.md
View file @
00850566
...
...
@@ -4010,6 +4010,7 @@ Autogenerated return type of UpdateSnippet.
|
`assignedMergeRequests`
| MergeRequestConnection | Merge Requests assigned to the user. |
|
`authoredMergeRequests`
| MergeRequestConnection | Merge Requests authored by the user. |
|
`avatarUrl`
| String | URL of the user's avatar. |
|
`bot`
| Boolean! | Indicates if the user is a bot. |
|
`email`
**{warning-solid}**
| String |
**Deprecated:**
Use public_email. Deprecated in 13.7. |
|
`groupCount`
| Int | Group count for the user. Available only when feature flag
`user_group_counts`
is enabled. |
|
`groupMemberships`
| GroupMemberConnection | Group memberships of the user. |
...
...
spec/graphql/types/user_type_spec.rb
View file @
00850566
...
...
@@ -10,6 +10,7 @@ RSpec.describe GitlabSchema.types['User'] do
it
'has the expected fields'
do
expected_fields
=
%w[
id
bot
user_permissions
snippets
name
...
...
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