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
543723e8
Commit
543723e8
authored
Dec 04, 2021
by
Kev
Committed by
Douglas Barbosa Alexandre
Jan 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GraphQL/FieldMethod offense (Part 2/2)
parent
4ee3f688
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
29 deletions
+8
-29
.rubocop_todo/graphql/field_method.yml
.rubocop_todo/graphql/field_method.yml
+0
-4
ee/app/graphql/types/dast/profile_type.rb
ee/app/graphql/types/dast/profile_type.rb
+1
-5
ee/app/graphql/types/dast_site_validation_type.rb
ee/app/graphql/types/dast_site_validation_type.rb
+2
-5
ee/app/graphql/types/group_release_stats_type.rb
ee/app/graphql/types/group_release_stats_type.rb
+3
-10
ee/app/graphql/types/incident_management/oncall_rotation_type.rb
...graphql/types/incident_management/oncall_rotation_type.rb
+2
-5
No files found.
.rubocop_todo/graphql/field_method.yml
View file @
543723e8
...
...
@@ -6,7 +6,3 @@ GraphQL/FieldMethod:
-
app/graphql/types/metrics/dashboards/annotation_type.rb
-
app/graphql/types/packages/package_details_type.rb
-
app/graphql/types/project_type.rb
-
ee/app/graphql/types/dast/profile_type.rb
-
ee/app/graphql/types/dast_site_validation_type.rb
-
ee/app/graphql/types/group_release_stats_type.rb
-
ee/app/graphql/types/incident_management/oncall_rotation_type.rb
ee/app/graphql/types/dast/profile_type.rb
View file @
543723e8
...
...
@@ -26,7 +26,7 @@ module Types
description:
'Associated scanner profile.'
field
:dast_profile_schedule
,
::
Types
::
Dast
::
ProfileScheduleType
,
null:
true
,
description:
'Associated profile schedule.'
description:
'Associated profile schedule.'
,
method: :dast_profile_schedule
field
:branch
,
Dast
::
ProfileBranchType
,
null:
true
,
description:
'Associated branch.'
,
...
...
@@ -38,10 +38,6 @@ module Types
def
edit_path
Gitlab
::
Routing
.
url_helpers
.
edit_project_on_demand_scan_path
(
object
.
project
,
object
)
end
def
dast_profile_schedule
object
.
dast_profile_schedule
end
end
end
end
ee/app/graphql/types/dast_site_validation_type.rb
View file @
543723e8
...
...
@@ -15,10 +15,7 @@ module Types
method: :state
field
:normalized_target_url
,
GraphQL
::
Types
::
String
,
null:
true
,
description:
'Normalized URL of the target to be validated.'
def
normalized_target_url
object
.
url_base
end
description:
'Normalized URL of the target to be validated.'
,
method: :url_base
end
end
ee/app/graphql/types/group_release_stats_type.rb
View file @
543723e8
...
...
@@ -8,17 +8,10 @@ module Types
authorize
:read_group_release_stats
field
:releases_count
,
GraphQL
::
Types
::
Int
,
null:
true
,
description:
'Total number of releases in all descendant projects of the group.'
def
releases_count
object
.
releases_count
end
description:
'Total number of releases in all descendant projects of the group.'
,
method: :releases_count
field
:releases_percentage
,
GraphQL
::
Types
::
Int
,
null:
true
,
description:
"Percentage of the group's descendant projects that have at least one release."
def
releases_percentage
object
.
releases_percentage
end
description:
"Percentage of the group's descendant projects that have at least one release."
,
method: :releases_percentage
end
end
ee/app/graphql/types/incident_management/oncall_rotation_type.rb
View file @
543723e8
...
...
@@ -48,7 +48,8 @@ module Types
field
:participants
,
::
Types
::
IncidentManagement
::
OncallParticipantType
.
connection_type
,
null:
true
,
description:
'Participants of the on-call rotation.'
description:
'Participants of the on-call rotation.'
,
method: :active_participants
field
:shifts
,
::
Types
::
IncidentManagement
::
OncallShiftType
.
connection_type
,
...
...
@@ -56,10 +57,6 @@ module Types
description:
'Blocks of time for which a participant is on-call within a given time frame. Time frame cannot exceed one month.'
,
max_page_size:
MAX_SHIFTS_FOR_TIMEFRAME
,
resolver:
::
Resolvers
::
IncidentManagement
::
OncallShiftsResolver
def
participants
object
.
active_participants
end
end
end
end
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