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
dd081481
Commit
dd081481
authored
Sep 17, 2019
by
Nick Thomas
Committed by
Yorick Peterse
Sep 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove approver details from added-approve emails
parent
e8d813ac
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
ee/app/presenters/ee/merge_request_presenter.rb
ee/app/presenters/ee/merge_request_presenter.rb
+4
-0
ee/app/views/notify/_merge_request_approvers.html.haml
ee/app/views/notify/_merge_request_approvers.html.haml
+1
-1
ee/app/views/notify/_merge_request_approvers.text.erb
ee/app/views/notify/_merge_request_approvers.text.erb
+1
-1
ee/spec/presenters/merge_request_presenter_spec.rb
ee/spec/presenters/merge_request_presenter_spec.rb
+10
-0
No files found.
ee/app/presenters/ee/merge_request_presenter.rb
View file @
dd081481
...
...
@@ -57,6 +57,10 @@ module EE
::
ApproverGroup
.
filtered_approver_groups
(
merge_request
.
approver_groups
,
current_user
)
end
def
suggested_approvers
merge_request
.
approval_state
.
suggested_approvers
(
current_user:
current_user
)
end
private
def
expose_mr_approval_path?
...
...
ee/app/views/notify/_merge_request_approvers.html.haml
View file @
dd081481
...
...
@@ -2,4 +2,4 @@
-
return
unless
presenter
.
approvers
.
any?
%p
Approvers:
#{
render_items_list
(
presenter
.
approvers_left
.
map
(
&
:name
))
}
Approvers:
#{
render_items_list
(
presenter
.
suggested_approvers
.
map
(
&
:name
))
}
ee/app/views/notify/_merge_request_approvers.text.erb
View file @
dd081481
<%-
presenter
=
local_assigns
.
fetch
(
:presenter
)
-%>
<%-
return
unless
presenter
.
approvers
.
any?
-%>
Approvers:
<%=
render_items_list
(
presenter
.
approvers_left
.
map
(
&
:name
))
%>
Approvers:
<%=
render_items_list
(
presenter
.
suggested_approvers
.
map
(
&
:name
))
%>
ee/spec/presenters/merge_request_presenter_spec.rb
View file @
dd081481
...
...
@@ -121,6 +121,16 @@ describe MergeRequestPresenter do
end
end
describe
'#suggested_approvers'
do
subject
{
described_class
.
new
(
merge_request
,
current_user:
user
).
suggested_approvers
}
it
'delegates to the approval state'
do
expect
(
merge_request
.
approval_state
).
to
receive
(
:suggested_approvers
).
with
(
current_user:
user
)
{
[
:ok
]
}
is_expected
.
to
contain_exactly
(
:ok
)
end
end
describe
'create vulnerability feedback paths'
do
where
(
:create_feedback_path
)
do
[
...
...
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