Commit 2c598334 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'enable-merge-request-reviewers-feature' into 'master'

Enable merge_request_reviewers feature flag

See merge request gitlab-org/gitlab!49787
parents fa9578bb aecbadb4
......@@ -12,7 +12,7 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
before_action :build_merge_request, except: [:create]
before_action do
push_frontend_feature_flag(:merge_request_reviewers, @project)
push_frontend_feature_flag(:merge_request_reviewers, @project, default_enabled: true)
push_frontend_feature_flag(:mr_collapsed_approval_rules, @project)
end
......
......@@ -51,7 +51,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action do
push_frontend_feature_flag(:vue_issuable_sidebar, @project.group)
push_frontend_feature_flag(:merge_request_reviewers, @project)
push_frontend_feature_flag(:merge_request_reviewers, @project, default_enabled: true)
push_frontend_feature_flag(:mr_collapsed_approval_rules, @project)
end
......
......@@ -1755,7 +1755,7 @@ class MergeRequest < ApplicationRecord
end
def allows_reviewers?
Feature.enabled?(:merge_request_reviewers, project)
Feature.enabled?(:merge_request_reviewers, project, default_enabled: true)
end
def allows_multiple_reviewers?
......
......@@ -55,7 +55,7 @@
- if merge_request.assignees.any?
%li.gl-display-flex.gl-align-items-center
= render 'shared/issuable/assignees', project: merge_request.project, issuable: merge_request
- if Feature.enabled?(:merge_request_reviewers, @project) && merge_request.reviewers.any?
- if Feature.enabled?(:merge_request_reviewers, @project, default_enabled: true) && merge_request.reviewers.any?
%li.gl-display-flex.issuable-reviewers
= render 'shared/issuable/reviewers', project: merge_request.project, issuable: merge_request
= render 'projects/merge_requests/approvals_count', merge_request: merge_request
......
......@@ -25,7 +25,7 @@
.block.assignee.qa-assignee-block
= render "shared/issuable/sidebar_assignees", issuable_sidebar: issuable_sidebar, assignees: assignees, signed_in: signed_in
- if Feature.enabled?(:merge_request_reviewers, @project) && reviewers
- if Feature.enabled?(:merge_request_reviewers, @project, default_enabled: true) && reviewers
.block.reviewer.qa-reviewer-block
= render "shared/issuable/sidebar_reviewers", issuable_sidebar: issuable_sidebar, reviewers: reviewers, signed_in: signed_in
......
......@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/245190
milestone: '13.4'
type: development
group: group::code review
default_enabled: false
default_enabled: true
......@@ -114,10 +114,11 @@ It is also possible to manage multiple assignees:
### Reviewer
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216054) in GitLab 13.5.
> - It's [deployed behind a feature flag](../../../user/feature_flags.md), enabled by default.
> - It's disabled on GitLab.com.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-merge-request-reviewers). **(CORE ONLY)**
> - It was [deployed behind a feature flag](../../../user/feature_flags.md), disabled by default.
> - [Became enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49787) on GitLab 13.7.1.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-merge-request-reviewers). **(CORE ONLY)**
WARNING:
This feature might not be available to you. Check the **version history** note above for details.
......@@ -136,21 +137,27 @@ To request it, open the **Reviewers** drop-down box to search for the user you w
#### Enable or disable Merge Request Reviewers **(CORE ONLY)**
Merge Request Reviewers is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
Merge Request Reviewers is under development but ready for production use.
It is deployed behind a feature flag that is **enabled by default**.
[GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md)
can enable it.
can opt to disable it.
To enable it:
```ruby
# For the instance
Feature.enable(:merge_request_reviewers)
# For a single project
Feature.enable(:merge_request_reviewers, Project.find(<project id>))
```
To disable it:
```ruby
# For the instance
Feature.disable(:merge_request_reviewers)
# For a single project
Feature.disable(:merge_request_reviewers, Project.find(<project id>))
```
### Merge requests to close issues
......
......@@ -3,7 +3,7 @@
- return unless issuable.is_a?(MergeRequest)
- return unless issuable.approval_feature_available?
- if !Feature.enabled?(:merge_request_reviewers, @project) || !Feature.enabled?(:mr_collapsed_approval_rules, @project)
- if !Feature.enabled?(:merge_request_reviewers, @project, default_enabled: true) || !Feature.enabled?(:mr_collapsed_approval_rules, @project)
.form-group.row
.col-sm-2.col-form-label
= form.label :approver_ids, "Approval rules"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment