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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
b9aa6c35
Commit
b9aa6c35
authored
Mar 02, 2017
by
Bob Van Landuyt
Committed by
Bob Van Landuyt
Mar 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize finding `discussions_to_resolve`
parent
f0dd2a54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
app/services/issues/resolve_discussions.rb
app/services/issues/resolve_discussions.rb
+9
-5
No files found.
app/services/issues/resolve_discussions.rb
View file @
b9aa6c35
...
@@ -25,11 +25,15 @@ module Issues
...
@@ -25,11 +25,15 @@ module Issues
def
discussions_to_resolve
def
discussions_to_resolve
return
[]
unless
merge_request_for_resolving_discussions
return
[]
unless
merge_request_for_resolving_discussions
@discussions_to_resolve
||=
NotesFinder
.
new
(
project
,
current_user
,
{
@discussions_to_resolve
||=
begin
discussion_id:
discussion_to_resolve_id
,
if
discussion_to_resolve_id
target_type:
MergeRequest
.
name
.
underscore
,
Array
(
merge_request_for_resolving_discussions
.
target_id:
merge_request_for_resolving_discussions
.
id
find_diff_discussion
(
discussion_to_resolve_id
))
}).
execute
.
discussions
.
select
(
&
:to_be_resolved?
)
else
merge_request_for_resolving_discussions
.
resolvable_discussions
end
end
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