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
72232d35
Commit
72232d35
authored
Jan 24, 2019
by
Andy Steele
Committed by
Nick Thomas
Jan 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display Merge Request approval counts in Merge Request list
parent
ccf14b48
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
0 deletions
+40
-0
app/controllers/concerns/issuable_collections.rb
app/controllers/concerns/issuable_collections.rb
+2
-0
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+1
-0
ee/app/controllers/concerns/ee/issuable_collections.rb
ee/app/controllers/concerns/ee/issuable_collections.rb
+18
-0
ee/app/models/concerns/approvable.rb
ee/app/models/concerns/approvable.rb
+4
-0
ee/app/views/projects/merge_requests/_approvals_count.html.haml
.../views/projects/merge_requests/_approvals_count.html.haml
+6
-0
ee/changelogs/unreleased/mr-approvals-on-mr-list.yml
ee/changelogs/unreleased/mr-approvals-on-mr-list.yml
+6
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
app/controllers/concerns/issuable_collections.rb
View file @
72232d35
...
...
@@ -200,3 +200,5 @@ module IssuableCollections
end
end
end
IssuableCollections
.
prepend
(
EE
::
IssuableCollections
)
app/views/projects/merge_requests/_merge_request.html.haml
View file @
72232d35
...
...
@@ -56,6 +56,7 @@
-
if
merge_request
.
assignee
%li
=
link_to_member
(
merge_request
.
source_project
,
merge_request
.
assignee
,
name:
false
,
title:
_
(
'Assigned to :name'
))
=
render_if_exists
'projects/merge_requests/approvals_count'
,
merge_request:
merge_request
=
render
'shared/issuable_meta_data'
,
issuable:
merge_request
...
...
ee/app/controllers/concerns/ee/issuable_collections.rb
0 → 100644
View file @
72232d35
# frozen_string_literal: true
module
EE
module
IssuableCollections
extend
ActiveSupport
::
Concern
extend
::
Gitlab
::
Utils
::
Override
override
:preload_for_collection
def
preload_for_collection
@preload_for_collection
||=
case
collection_type
when
'MergeRequest'
super
.
push
(
:approvals
)
else
super
end
end
end
end
ee/app/models/concerns/approvable.rb
View file @
72232d35
...
...
@@ -19,6 +19,10 @@ module Approvable
approvals_left
<
1
end
def
approvals_given
approvals
.
size
end
# Number of approvals remaining (excluding existing approvals) before the MR is
# considered approved. If there are fewer potential approvers than approvals left,
# users should either reduce the number of approvers on projects and/or merge
...
...
ee/app/views/projects/merge_requests/_approvals_count.html.haml
0 → 100644
View file @
72232d35
-
if
merge_request
.
approval_needed?
%li
.d-none.d-sm-inline-block.has-tooltip
{
title:
_
(
'Approvals'
),
class:
(
'text-success'
if
merge_request
.
approved?
)
}
=
sprite_icon
(
'approval'
,
size:
16
,
css_class:
'align-middle'
)
=
merge_request
.
approvals_given
of
=
merge_request
.
approvals_required
ee/changelogs/unreleased/mr-approvals-on-mr-list.yml
0 → 100644
View file @
72232d35
---
title
:
Shows the approval given/required counts and its status for each MR when
viewing the Merge Requests page
merge_request
:
9142
author
:
Glavin Wiechert, Andy Steele
type
:
added
locale/gitlab.pot
View file @
72232d35
...
...
@@ -892,6 +892,9 @@ msgstr ""
msgid "Apply suggestion"
msgstr ""
msgid "Approvals"
msgstr ""
msgid "Approvals required"
msgstr ""
...
...
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