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
a39986e8
Commit
a39986e8
authored
Feb 24, 2022
by
Siddharth Asthana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GraphQL/OrderedFields offenses
Changelog: other
parent
8b106806
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
85 additions
and
93 deletions
+85
-93
.rubocop_todo/graphql/ordered_fields.yml
.rubocop_todo/graphql/ordered_fields.yml
+0
-8
app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb
...hql/types/error_tracking/sentry_error_stack_trace_type.rb
+3
-3
app/graphql/types/error_tracking/sentry_error_type.rb
app/graphql/types/error_tracking/sentry_error_type.rb
+30
-30
app/graphql/types/evidence_type.rb
app/graphql/types/evidence_type.rb
+4
-4
app/graphql/types/grafana_integration_type.rb
app/graphql/types/grafana_integration_type.rb
+6
-6
app/graphql/types/issue_type.rb
app/graphql/types/issue_type.rb
+22
-22
app/graphql/types/jira_import_type.rb
app/graphql/types/jira_import_type.rb
+6
-6
app/graphql/types/jira_user_type.rb
app/graphql/types/jira_user_type.rb
+6
-6
app/graphql/types/label_type.rb
app/graphql/types/label_type.rb
+8
-8
No files found.
.rubocop_todo/graphql/ordered_fields.yml
View file @
a39986e8
...
...
@@ -32,14 +32,6 @@ GraphQL/OrderedFields:
-
app/graphql/types/error_tracking/sentry_error_frequency_type.rb
-
app/graphql/types/error_tracking/sentry_error_stack_trace_context_type.rb
-
app/graphql/types/error_tracking/sentry_error_stack_trace_entry_type.rb
-
app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb
-
app/graphql/types/error_tracking/sentry_error_type.rb
-
app/graphql/types/evidence_type.rb
-
app/graphql/types/grafana_integration_type.rb
-
app/graphql/types/issue_type.rb
-
app/graphql/types/jira_import_type.rb
-
app/graphql/types/jira_user_type.rb
-
app/graphql/types/label_type.rb
-
app/graphql/types/merge_request_type.rb
-
app/graphql/types/metadata/kas_type.rb
-
app/graphql/types/metadata_type.rb
...
...
app/graphql/types/error_tracking/sentry_error_stack_trace_type.rb
View file @
a39986e8
...
...
@@ -8,12 +8,12 @@ module Types
authorize
:read_sentry_issue
field
:issue_id
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'ID of the Sentry error.'
field
:date_received
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Time the stack trace was received by Sentry.'
field
:issue_id
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'ID of the Sentry error.'
field
:stack_trace_entries
,
[
Types
::
ErrorTracking
::
SentryErrorStackTraceEntryType
],
null:
false
,
description:
'Stack trace entries for the Sentry error.'
...
...
app/graphql/types/error_tracking/sentry_error_type.rb
View file @
a39986e8
...
...
@@ -9,49 +9,34 @@ module Types
present_using
SentryErrorPresenter
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'ID (global ID) of the error.'
field
:sentry_id
,
GraphQL
::
Types
::
String
,
method: :id
,
null:
false
,
description:
'ID (Sentry ID) of the error.'
field
:first_seen
,
Types
::
TimeType
,
null:
false
,
description:
'Timestamp when the error was first seen.'
field
:last_seen
,
Types
::
TimeType
,
null:
false
,
description:
'Timestamp when the error was last seen.'
field
:title
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Title of the error.'
field
:type
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Type of the error.'
field
:user_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of users affected by the error.'
field
:count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of occurrences.'
field
:message
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Sentry metadata message of the error.'
field
:culprit
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Culprit of the error.'
field
:external_url
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'External URL of the error.'
field
:short_id
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Short ID (Sentry ID) of the error.'
field
:status
,
Types
::
ErrorTracking
::
SentryErrorStatusEnum
,
field
:first_seen
,
Types
::
TimeType
,
null:
false
,
description:
'
Status of the error
.'
description:
'
Timestamp when the error was first seen
.'
field
:frequency
,
[
Types
::
ErrorTracking
::
SentryErrorFrequencyType
],
null:
false
,
description:
'Last 24hr stats of the error.'
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'ID (global ID) of the error.'
field
:last_seen
,
Types
::
TimeType
,
null:
false
,
description:
'Timestamp when the error was last seen.'
field
:message
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Sentry metadata message of the error.'
field
:sentry_id
,
GraphQL
::
Types
::
String
,
method: :id
,
null:
false
,
description:
'ID (Sentry ID) of the error.'
field
:sentry_project_id
,
GraphQL
::
Types
::
ID
,
method: :project_id
,
null:
false
,
...
...
@@ -64,6 +49,21 @@ module Types
method: :project_slug
,
null:
false
,
description:
'Slug of the project affected by the error.'
field
:short_id
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Short ID (Sentry ID) of the error.'
field
:status
,
Types
::
ErrorTracking
::
SentryErrorStatusEnum
,
null:
false
,
description:
'Status of the error.'
field
:title
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Title of the error.'
field
:type
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Type of the error.'
field
:user_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of users affected by the error.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
...
...
app/graphql/types/evidence_type.rb
View file @
a39986e8
...
...
@@ -9,13 +9,13 @@ module Types
present_using
Releases
::
EvidencePresenter
field
:collected_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp when the evidence was collected.'
field
:filepath
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'URL from where the evidence can be downloaded.'
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'ID of the evidence.'
field
:sha
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'SHA1 ID of the evidence hash.'
field
:filepath
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'URL from where the evidence can be downloaded.'
field
:collected_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp when the evidence was collected.'
end
end
app/graphql/types/grafana_integration_type.rb
View file @
a39986e8
...
...
@@ -6,14 +6,14 @@ module Types
authorize
:admin_operations
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'Internal ID of the Grafana integration.'
field
:grafana_url
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'URL for the Grafana host for the Grafana integration.'
field
:enabled
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
description:
'Indicates whether Grafana integration is enabled.'
field
:created_at
,
Types
::
TimeType
,
null:
false
,
description:
'Timestamp of the issue\'s creation.'
field
:enabled
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
description:
'Indicates whether Grafana integration is enabled.'
field
:grafana_url
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'URL for the Grafana host for the Grafana integration.'
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'Internal ID of the Grafana integration.'
field
:updated_at
,
Types
::
TimeType
,
null:
false
,
description:
'Timestamp of the issue\'s last activity.'
end
...
...
app/graphql/types/issue_type.rb
View file @
a39986e8
...
...
@@ -15,16 +15,16 @@ module Types
present_using
IssuePresenter
field
:description
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Description of the issue.'
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
"ID of the issue."
field
:iid
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
"Internal ID of the issue."
field
:title
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Title of the issue.'
field
:description
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Description of the issue.'
field
:state
,
IssueStateEnum
,
null:
false
,
description:
'State of the issue.'
field
:title
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Title of the issue.'
field
:reference
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Internal reference of the issue. Returned in shortened format by default.'
,
...
...
@@ -47,52 +47,52 @@ module Types
field
:milestone
,
Types
::
MilestoneType
,
null:
true
,
description:
'Milestone of the issue.'
field
:due_date
,
Types
::
TimeType
,
null:
true
,
description:
'Due date of the issue.'
field
:confidential
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
description:
'Indicates the issue is confidential.'
field
:discussion_locked
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
description:
'Indicates discussion is locked on the issue.'
field
:due_date
,
Types
::
TimeType
,
null:
true
,
description:
'Due date of the issue.'
field
:hidden
,
GraphQL
::
Types
::
Boolean
,
null:
true
,
resolver_method: :hidden?
,
description:
'Indicates the issue is hidden because the author has been banned. '
\
'Will always return `null` if `ban_user_feature_flag` feature flag is disabled.'
field
:discussion_locked
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
description:
'Indicates discussion is locked on the issue.'
field
:upvotes
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of upvotes the issue has received.'
field
:downvotes
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of downvotes the issue has received.'
field
:merge_requests_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of merge requests that close the issue on merge.'
,
resolver:
Resolvers
::
MergeRequestsCountResolver
field
:user_notes_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of user notes of the issue.'
,
resolver:
Resolvers
::
UserNotesCountResolver
field
:relative_position
,
GraphQL
::
Types
::
Int
,
null:
true
,
description:
'Relative position of the issue (used for positioning in epic tree and issue boards).'
field
:upvotes
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of upvotes the issue has received.'
field
:user_discussions_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of user discussions in the issue.'
,
resolver:
Resolvers
::
UserDiscussionsCountResolver
field
:user_notes_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Number of user notes of the issue.'
,
resolver:
Resolvers
::
UserNotesCountResolver
field
:web_path
,
GraphQL
::
Types
::
String
,
null:
false
,
method: :issue_path
,
description:
'Web path of the issue.'
field
:web_url
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Web URL of the issue.'
field
:relative_position
,
GraphQL
::
Types
::
Int
,
null:
true
,
description:
'Relative position of the issue (used for positioning in epic tree and issue boards).'
field
:participants
,
Types
::
UserType
.
connection_type
,
null:
true
,
complexity:
5
,
description:
'List of participants in the issue.'
,
resolver:
Resolvers
::
Users
::
ParticipantsResolver
field
:emails_disabled
,
GraphQL
::
Types
::
Boolean
,
null:
false
,
method: :project_emails_disabled?
,
description:
'Indicates if a project has email notifications disabled: `true` if email notifications are disabled.'
field
:human_time_estimate
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Human-readable time estimate of the issue.'
field
:human_total_time_spent
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Human-readable total time reported as spent on the issue.'
field
:participants
,
Types
::
UserType
.
connection_type
,
null:
true
,
complexity:
5
,
description:
'List of participants in the issue.'
,
resolver:
Resolvers
::
Users
::
ParticipantsResolver
field
:subscribed
,
GraphQL
::
Types
::
Boolean
,
method: :subscribed?
,
null:
false
,
complexity:
5
,
description:
'Indicates the currently logged in user is subscribed to the issue.'
field
:time_estimate
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Time estimate of the issue.'
field
:total_time_spent
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Total time reported as spent on the issue.'
field
:human_time_estimate
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Human-readable time estimate of the issue.'
field
:human_total_time_spent
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Human-readable total time reported as spent on the issue.'
field
:closed_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp of when the issue was closed.'
...
...
app/graphql/types/jira_import_type.rb
View file @
a39986e8
...
...
@@ -8,16 +8,16 @@ module Types
field
:created_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp of when the Jira import was created.'
field
:failed_to_import_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of issues that failed to import.'
field
:imported_issues_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of issues that were successfully imported.'
field
:jira_project_key
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Project key for the imported Jira project.'
field
:scheduled_at
,
Types
::
TimeType
,
null:
true
,
description:
'Timestamp of when the Jira import was scheduled.'
field
:scheduled_by
,
Types
::
UserType
,
null:
true
,
description:
'User that started the Jira import.'
field
:jira_project_key
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Project key for the imported Jira project.'
field
:imported_issues_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of issues that were successfully imported.'
field
:failed_to_import_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Count of issues that failed to import.'
field
:total_issue_count
,
GraphQL
::
Types
::
Int
,
null:
false
,
description:
'Total count of issues that were attempted to import.'
end
...
...
app/graphql/types/jira_user_type.rb
View file @
a39986e8
...
...
@@ -6,18 +6,18 @@ module Types
class
JiraUserType
<
BaseObject
graphql_name
'JiraUser'
field
:gitlab_id
,
GraphQL
::
Types
::
Int
,
null:
true
,
description:
'ID of the matched GitLab user.'
field
:gitlab_name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the matched GitLab user.'
field
:gitlab_username
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Username of the matched GitLab user.'
field
:jira_account_id
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Account ID of the Jira user.'
field
:jira_display_name
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Display name of the Jira user.'
field
:jira_email
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Email of the Jira user, returned only for users with public emails.'
field
:gitlab_id
,
GraphQL
::
Types
::
Int
,
null:
true
,
description:
'ID of the matched GitLab user.'
field
:gitlab_username
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Username of the matched GitLab user.'
field
:gitlab_name
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Name of the matched GitLab user.'
end
# rubocop: enable Graphql/AuthorizeTypes
end
app/graphql/types/label_type.rb
View file @
a39986e8
...
...
@@ -8,18 +8,18 @@ module Types
authorize
:read_label
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'Label ID.'
field
:description
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Description of the label (Markdown rendered as HTML for caching).'
field
:title
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Content of the label.'
field
:color
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Background color of the label.'
field
:text_color
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Text color of the label.'
field
:created_at
,
Types
::
TimeType
,
null:
false
,
description:
'When this label was created.'
field
:description
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Description of the label (Markdown rendered as HTML for caching).'
field
:id
,
GraphQL
::
Types
::
ID
,
null:
false
,
description:
'Label ID.'
field
:text_color
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Text color of the label.'
field
:title
,
GraphQL
::
Types
::
String
,
null:
false
,
description:
'Content of the label.'
field
:updated_at
,
Types
::
TimeType
,
null:
false
,
description:
'When this label was last updated.'
...
...
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