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
f976a897
Commit
f976a897
authored
Jan 25, 2019
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename feature flag
parent
ae047419
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
16 deletions
+3
-16
ee/app/services/ee/merge_requests/refresh_service.rb
ee/app/services/ee/merge_requests/refresh_service.rb
+1
-1
ee/app/services/ee/projects/update_service.rb
ee/app/services/ee/projects/update_service.rb
+1
-1
ee/lib/api/helpers/approval_helpers.rb
ee/lib/api/helpers/approval_helpers.rb
+1
-1
ee/spec/presenters/merge_request_presenter_spec.rb
ee/spec/presenters/merge_request_presenter_spec.rb
+0
-5
ee/spec/requests/api/merge_request_approvals_spec.rb
ee/spec/requests/api/merge_request_approvals_spec.rb
+0
-4
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
+0
-2
ee/spec/services/projects/update_service_spec.rb
ee/spec/services/projects/update_service_spec.rb
+0
-2
No files found.
ee/app/services/ee/merge_requests/refresh_service.rb
View file @
f976a897
...
...
@@ -40,7 +40,7 @@ module EE
def
update_approvers
return
yield
unless
project
.
feature_available?
(
:code_owners
)
if
::
Feature
.
enabled?
(
:approval_rule
)
if
::
Feature
.
enabled?
(
:approval_rule
s
,
project
)
results
=
yield
merge_requests_for_source_branch
.
each
(
&
:sync_code_owners_with_approvers
)
...
...
ee/app/services/ee/projects/update_service.rb
View file @
f976a897
...
...
@@ -79,7 +79,7 @@ module EE
def
sync_approval_rules
return
if
::
Feature
.
enabled?
(
:approval_rules
,
project
)
return
unless
project
.
previous_changes
.
include?
(
:approvals_before_merge
)
return
if
::
Feature
.
enabled?
(
:approval_rule
)
return
if
::
Feature
.
enabled?
(
:approval_rule
s
,
project
)
project
.
approval_rules
.
update_all
(
approvals_required:
project
.
approvals_before_merge
)
end
...
...
ee/lib/api/helpers/approval_helpers.rb
View file @
f976a897
...
...
@@ -4,7 +4,7 @@ module API
module
Helpers
module
ApprovalHelpers
def
present_approval
(
merge_request
)
if
Feature
.
enabled?
(
:approval_rule
)
if
Feature
.
enabled?
(
:approval_rule
s
,
merge_request
.
project
)
present
merge_request
.
approval_state
,
with:
::
EE
::
API
::
Entities
::
ApprovalState
,
current_user:
current_user
else
present
merge_request
.
present
(
current_user:
current_user
),
with:
::
EE
::
API
::
Entities
::
MergeRequestApprovals
,
current_user:
current_user
...
...
ee/spec/presenters/merge_request_presenter_spec.rb
View file @
f976a897
...
...
@@ -82,7 +82,6 @@ describe MergeRequestPresenter do
let!
(
:approver
)
{
create
(
:approver
,
target:
resource
)
}
before
do
stub_feature_flags
approval_rule:
true
resource
.
approvals
.
create!
(
user:
approver
.
user
)
end
...
...
@@ -149,10 +148,6 @@ describe MergeRequestPresenter do
let!
(
:private_approver_group
)
{
create
(
:approver_group
,
target:
resource
,
group:
private_group
)
}
let!
(
:approver
)
{
create
(
:approver
,
target:
resource
)
}
before
do
stub_feature_flags
approval_rule:
true
end
subject
{
described_class
.
new
(
resource
,
current_user:
user
).
all_approvers_including_groups
}
it
do
...
...
ee/spec/requests/api/merge_request_approvals_spec.rb
View file @
f976a897
...
...
@@ -399,10 +399,6 @@ describe "API::MergeRequestApprovals with approval_rule enabled" do
set
(
:approver
)
{
create
:user
}
set
(
:group
)
{
create
:group
}
before
do
stub_feature_flags
(
approval_rule:
true
)
end
describe
'GET :id/merge_requests/:merge_request_iid/approvals'
do
let!
(
:rule
)
{
create
(
:approval_merge_request_rule
,
merge_request:
merge_request
,
approvals_required:
2
,
name:
'foo'
)
}
...
...
ee/spec/services/ee/merge_requests/refresh_service_spec.rb
View file @
f976a897
...
...
@@ -143,8 +143,6 @@ describe MergeRequests::RefreshService do
let
(
:new_owners
)
{
[
owner
]
}
before
do
stub_feature_flags
(
approval_rule:
true
)
relevant_merge_requests
.
each
do
|
merge_request
|
expect
(
::
Gitlab
::
CodeOwners
).
to
receive
(
:for_merge_request
).
with
(
merge_request
).
and_return
(
new_owners
)
end
...
...
ee/spec/services/projects/update_service_spec.rb
View file @
f976a897
...
...
@@ -254,8 +254,6 @@ describe Projects::UpdateService, '#execute' do
context
'when approval_rule feature is enabled'
do
it
"does not update approval_rules' approvals_required"
do
stub_feature_flags
(
approval_rule:
true
)
rule
=
create
(
:approval_project_rule
,
project:
project
)
expect
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