Commit 14fed7a3 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '293742-feature-flag-rollout-of-reviewer_approval_rules' into 'master'

Remove reviewer_approval_rules feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!53205
parents 3e75345f db9f4d21
...@@ -834,7 +834,7 @@ UsersSelect.prototype.renderRowAvatar = function (issuableType, user, img) { ...@@ -834,7 +834,7 @@ UsersSelect.prototype.renderRowAvatar = function (issuableType, user, img) {
UsersSelect.prototype.renderApprovalRules = function (elsClassName, approvalRules = []) { UsersSelect.prototype.renderApprovalRules = function (elsClassName, approvalRules = []) {
const count = approvalRules.length; const count = approvalRules.length;
if (!gon.features?.reviewerApprovalRules || !elsClassName?.includes('reviewer') || !count) { if (!elsClassName?.includes('reviewer') || !count) {
return ''; return '';
} }
......
...@@ -13,7 +13,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap ...@@ -13,7 +13,6 @@ class Projects::MergeRequests::CreationsController < Projects::MergeRequests::Ap
before_action do before_action do
push_frontend_feature_flag(:mr_collapsed_approval_rules, @project) push_frontend_feature_flag(:mr_collapsed_approval_rules, @project)
push_frontend_feature_flag(:reviewer_approval_rules, @project, default_enabled: :yaml)
end end
def new def new
......
...@@ -53,7 +53,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -53,7 +53,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action do before_action do
push_frontend_feature_flag(:mr_collapsed_approval_rules, @project) push_frontend_feature_flag(:mr_collapsed_approval_rules, @project)
push_frontend_feature_flag(:reviewer_approval_rules, @project, default_enabled: :yaml)
end end
around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions] around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions]
......
---
name: reviewer_approval_rules
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46738
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/293742
milestone: '13.7'
type: development
group: group::code review
default_enabled: true
...@@ -66,7 +66,7 @@ the tiers are no longer mentioned in GitLab documentation: ...@@ -66,7 +66,7 @@ the tiers are no longer mentioned in GitLab documentation:
- [Full code quality reports in the code quality tab](../user/project/merge_requests/code_quality.md#code-quality-reports) - [Full code quality reports in the code quality tab](../user/project/merge_requests/code_quality.md#code-quality-reports)
- [Merge request approvals](../user/project/merge_requests/merge_request_approvals.md) - [Merge request approvals](../user/project/merge_requests/merge_request_approvals.md)
- [Multiple assignees](../user/project/merge_requests/getting_started.md#multiple-assignees) - [Multiple assignees](../user/project/merge_requests/getting_started.md#multiple-assignees)
- [Approval Rule information for Reviewers](../user/project/merge_requests/getting_started.md#approval-rule-information-for-reviewers), and [enabling or disabling it](../user/project/merge_requests/getting_started.md#enable-or-disable-approval-rule-information-for-reviewers) - [Approval Rule information for Reviewers](../user/project/merge_requests/getting_started.md#approval-rule-information-for-reviewers) **(PREMIUM)**
- [Required Approvals](../user/project/merge_requests/merge_request_approvals.md#required-approvals) - [Required Approvals](../user/project/merge_requests/merge_request_approvals.md#required-approvals)
- [Code Owners as eligible approvers](../user/project/merge_requests/merge_request_approvals.md#code-owners-as-eligible-approvers) - [Code Owners as eligible approvers](../user/project/merge_requests/merge_request_approvals.md#code-owners-as-eligible-approvers)
- All [Approval rules](../user/project/merge_requests/merge_request_approvals.md#approval-rules) features - All [Approval rules](../user/project/merge_requests/merge_request_approvals.md#approval-rules) features
......
...@@ -133,16 +133,7 @@ To request it, open the **Reviewers** drop-down box to search for the user you w ...@@ -133,16 +133,7 @@ To request it, open the **Reviewers** drop-down box to search for the user you w
#### Approval Rule information for Reviewers **(PREMIUM)** #### Approval Rule information for Reviewers **(PREMIUM)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233736) in GitLab 13.8. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/233736) in GitLab 13.8.
> - Moved to GitLab Premium in 13.9. > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/293742) in GitLab 13.9.
> - 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/51183) in GitLab 13.8.
> - It's enabled on GitLab.com.
> - It's recommended for production use.
> - It can be enabled or disabled for a single project.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-approval-rule-information-for-reviewers). **(PREMIUM SELF)**
WARNING:
This feature might not be available to you. Check the **version history** note above for details.
When editing the **Reviewers** field in a new or existing merge request, GitLab When editing the **Reviewers** field in a new or existing merge request, GitLab
displays the name of the matching [approval rule](merge_request_approvals.md#approval-rules) displays the name of the matching [approval rule](merge_request_approvals.md#approval-rules)
...@@ -156,31 +147,6 @@ This example shows reviewers and approval rules in a merge request sidebar: ...@@ -156,31 +147,6 @@ This example shows reviewers and approval rules in a merge request sidebar:
![Reviewer approval rules in sidebar](img/reviewer_approval_rules_sidebar_v13_8.png) ![Reviewer approval rules in sidebar](img/reviewer_approval_rules_sidebar_v13_8.png)
##### Enable or disable Approval Rule information for Reviewers **(PREMIUM SELF)**
Merge Request Reviewers is under development and 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 opt to disable it.
To enable it:
```ruby
# For the instance
Feature.enable(:reviewer_approval_rules)
# For a single project
Feature.enable(:reviewer_approval_rules, Project.find(<project id>))
```
To disable it:
```ruby
# For the instance
Feature.disable(:reviewer_approval_rules)
# For a single project
Feature.disable(:reviewer_approval_rules, Project.find(<project id>))
```
### Merge requests to close issues ### Merge requests to close issues
If the merge request is being created to resolve an issue, you can If the merge request is being created to resolve an issue, you can
......
---
title: Remove reviewer_approval_rules feature flag
merge_request: 53205
author:
type: removed
...@@ -32,23 +32,6 @@ RSpec.describe 'Merge request > User edits MR with multiple reviewers' do ...@@ -32,23 +32,6 @@ RSpec.describe 'Merge request > User edits MR with multiple reviewers' do
expect(page).to have_content(rule_name) expect(page).to have_content(rule_name)
end end
end end
context 'when reviewer_approval_rules feature flag off' do
before do
stub_feature_flags(reviewer_approval_rules: false)
visit edit_project_merge_request_path(target_project, merge_request)
end
it 'is not shown in reviewer dropdown' do
find('.js-reviewer-search').click
wait_for_requests
page.within '.dropdown-menu-reviewer' do
expect(page).not_to have_content(rule_name)
end
end
end
end end
context 'code owner approval rules', :js do context 'code owner approval rules', :js do
......
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