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
d01153c4
Commit
d01153c4
authored
Jul 20, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'approvers_fixes' into 'master'
Approvals fixes See merge request !452
parents
165a3cf3
e80bfcc5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
app/models/merge_request.rb
app/models/merge_request.rb
+1
-1
app/views/projects/_merge_request_settings.html.haml
app/views/projects/_merge_request_settings.html.haml
+3
-2
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+1
-1
No files found.
app/models/merge_request.rb
View file @
d01153c4
...
...
@@ -486,7 +486,7 @@ class MergeRequest < ActiveRecord::Base
def
approver_ids
=
(
value
)
value
.
split
(
","
).
map
(
&
:strip
).
each
do
|
user_id
|
approvers
.
find_or_
creat
e_by
(
user_id:
user_id
,
target_id:
id
)
approvers
.
find_or_
initializ
e_by
(
user_id:
user_id
,
target_id:
id
)
end
end
end
app/views/projects/_merge_request_settings.html.haml
View file @
d01153c4
...
...
@@ -28,7 +28,7 @@
.col-sm-10
=
f
.
number_field
:approvals_before_merge
,
class:
"form-control"
,
min:
0
.help-block
How many users should approve merge request before it can be accepted. 0 - approval
is disabled
Number of users to approve a merge request before it can be accepted. 0 - approving
is disabled
.form-group.reset-approvals-on-push
.col-sm-offset-2.col-sm-10
...
...
@@ -36,6 +36,7 @@
=
f
.
label
:reset_approvals_on_push
do
=
f
.
check_box
:reset_approvals_on_push
%span
.descr
Reset approvals on push
.help-block
Approvals are reset when new data is pushed to the merge request
.form-group
=
f
.
label
:approver_ids
,
class:
'control-label'
do
...
...
@@ -43,7 +44,7 @@
.col-sm-10
=
users_select_tag
(
"project[approver_ids]"
,
multiple:
true
,
class:
'input-large'
,
scope: :all
,
email_user:
true
)
.help-block
Default approvers for each merge request.
Add an approver suggestion for each merge request
.panel.panel-default.prepend-top-10
.panel-heading
...
...
app/views/shared/issuable/_form.html.haml
View file @
d01153c4
...
...
@@ -90,7 +90,7 @@
.help-block
Merge Request should be approved by these users.
-
if
@project
.
approvers
.
any?
By default
:
#{
render_items_list
(
@project
.
approvers
.
map
{
|
approver
|
approver
.
user
.
name
})
}
.
Suggested approver(s)
:
#{
render_items_list
(
@project
.
approvers
.
map
{
|
approver
|
approver
.
user
.
name
})
}
.
You can override the project settings by setting your own list of approvers.
.panel.panel-default.prepend-top-10
...
...
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