BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
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