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
d2486ae4
Commit
d2486ae4
authored
May 29, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide N+1 query behind intended feature flag
parent
6dfdecb0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
app/graphql/types/alert_management/alert_type.rb
app/graphql/types/alert_management/alert_type.rb
+6
-0
spec/requests/api/graphql/project/alert_management/alerts_spec.rb
...uests/api/graphql/project/alert_management/alerts_spec.rb
+13
-0
No files found.
app/graphql/types/alert_management/alert_type.rb
View file @
d2486ae4
...
@@ -88,6 +88,12 @@ module Types
...
@@ -88,6 +88,12 @@ module Types
[
Types
::
UserType
],
[
Types
::
UserType
],
null:
true
,
null:
true
,
description:
'Assignees of the alert'
description:
'Assignees of the alert'
def
assignees
return
User
.
none
unless
Feature
.
enabled?
(
:alert_assignee
,
object
.
project
)
object
.
assignees
end
end
end
end
end
end
end
spec/requests/api/graphql/project/alert_management/alerts_spec.rb
View file @
d2486ae4
...
@@ -137,5 +137,18 @@ describe 'getting Alert Management Alerts' do
...
@@ -137,5 +137,18 @@ describe 'getting Alert Management Alerts' do
end
end
end
end
end
end
context
'with alert_assignee flag disabled'
do
before
do
stub_feature_flags
(
alert_assignee:
false
)
project
.
add_developer
(
current_user
)
post_graphql
(
query
,
current_user:
current_user
)
end
it
'excludes assignees'
do
expect
(
alerts
.
first
[
'assignees'
]).
to
be_empty
end
end
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