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
e9a3f7fe
Commit
e9a3f7fe
authored
Nov 02, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip analysis if no approvals required
parent
d1e96959
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
ee/app/presenters/merge_request_approver_presenter.rb
ee/app/presenters/merge_request_approver_presenter.rb
+7
-10
No files found.
ee/app/presenters/merge_request_approver_presenter.rb
View file @
e9a3f7fe
...
...
@@ -40,14 +40,7 @@ class MergeRequestApproverPresenter < Gitlab::View::Presenter::Simple
private
def
users
return
@users
if
defined?
(
@users
)
load_users
@users
end
def
load_users
set_users_from_git_log_authors
@users
||=
users_from_git_log_authors
end
def
code_owner_enabled?
...
...
@@ -56,8 +49,12 @@ class MergeRequestApproverPresenter < Gitlab::View::Presenter::Simple
end
end
def
set_users_from_git_log_authors
@users
=
::
Gitlab
::
AuthorityAnalyzer
.
new
(
merge_request
,
skip_user
).
calculate
.
first
(
merge_request
.
approvals_required
)
def
users_from_git_log_authors
if
merge_request
.
approvals_required
>
0
::
Gitlab
::
AuthorityAnalyzer
.
new
(
merge_request
,
skip_user
).
calculate
.
first
(
merge_request
.
approvals_required
)
else
[]
end
end
def
code_owner_loader
...
...
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