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
83169f3b
Commit
83169f3b
authored
Aug 26, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6e1a745e
bbd39021
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
changelogs/unreleased/sh-fix-nplusone-issues.yml
changelogs/unreleased/sh-fix-nplusone-issues.yml
+5
-0
doc/api/issues.md
doc/api/issues.md
+0
-1
lib/api/issues.rb
lib/api/issues.rb
+2
-1
spec/requests/api/issues/get_project_issues_spec.rb
spec/requests/api/issues/get_project_issues_spec.rb
+8
-0
No files found.
changelogs/unreleased/sh-fix-nplusone-issues.yml
0 → 100644
View file @
83169f3b
---
title
:
Fix N+1 Gitaly calls in /api/v4/projects/:id/issues
merge_request
:
32171
author
:
type
:
performance
doc/api/issues.md
View file @
83169f3b
...
...
@@ -284,7 +284,6 @@ Example response:
"award_emoji"
:
"http://example.com/api/v4/projects/4/issues/41/award_emoji"
,
"project"
:
"http://example.com/api/v4/projects/4"
},
"subscribed"
:
false
,
"task_completion_status"
:{
"count"
:
0
,
"completed_count"
:
0
...
...
lib/api/issues.rb
View file @
83169f3b
...
...
@@ -163,7 +163,8 @@ module API
with_labels_details:
declared_params
[
:with_labels_details
],
current_user:
current_user
,
project:
user_project
,
issuable_metadata:
issuable_meta_data
(
issues
,
'Issue'
,
current_user
)
issuable_metadata:
issuable_meta_data
(
issues
,
'Issue'
,
current_user
),
include_subscribed:
false
}
present
issues
,
options
...
...
spec/requests/api/issues/get_project_issues_spec.rb
View file @
83169f3b
...
...
@@ -446,6 +446,14 @@ describe API::Issues do
expect_paginated_array_response
([
closed_issue
.
id
,
confidential_issue
.
id
,
issue
.
id
])
end
it
'exposes known attributes'
do
get
api
(
"
#{
base_url
}
/issues"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
.
last
.
keys
).
to
include
(
*
%w(id iid project_id title description)
)
expect
(
json_response
.
last
).
not_to
have_key
(
'subscribed'
)
end
context
'issues_statistics'
do
context
'no state is treated as all state'
do
let
(
:params
)
{
{}
}
...
...
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