Commit 31f45d7b authored by Kerri Miller's avatar Kerri Miller

Merge branch '325163-remove-global-default-branch-ff' into 'master'

Remove the global default branch feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!59024
parents 55580cc9 55d9f168
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
- page_title _("Repository") - page_title _("Repository")
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
- if Feature.enabled?(:global_default_branch_name, default_enabled: true) %section.settings.as-default-branch-name.no-animate#js-default-branch-name{ class: ('expanded' if expanded_by_default?) }
%section.settings.as-default-branch-name.no-animate#js-default-branch-name{ class: ('expanded' if expanded_by_default?) } .settings-header
.settings-header %h4
%h4 = _('Default initial branch name')
= _('Default initial branch name') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand')
= expanded_by_default? ? _('Collapse') : _('Expand') %p
%p = _('Set the default name of the initial branch when creating new repositories through the user interface.')
= _('Set the default name of the initial branch when creating new repositories through the user interface.') .settings-content
.settings-content = render 'initial_branch_name'
= render 'initial_branch_name'
%section.settings.as-mirror.no-animate#js-mirror-settings{ class: ('expanded' if expanded_by_default?) } %section.settings.as-mirror.no-animate#js-mirror-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header .settings-header
......
---
title: Remove the global default branch feature flag
merge_request: 59024
author:
type: other
---
name: global_default_branch_name
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/35269
rollout_issue_url:
milestone: '13.2'
type: development
group: group::source code
default_enabled: true
...@@ -60,7 +60,6 @@ GitLab administrators can configure a new default branch name at the ...@@ -60,7 +60,6 @@ GitLab administrators can configure a new default branch name at the
> - It's deployed behind a feature flag, enabled by default. > - It's deployed behind a feature flag, enabled by default.
> - It cannot be enabled or disabled per-project. > - It cannot be enabled or disabled per-project.
> - It's recommended for production use. > - It's recommended for production use.
> - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-custom-initial-branch-name).
GitLab [administrators](../../../permissions.md) of self-managed instances can GitLab [administrators](../../../permissions.md) of self-managed instances can
customize the initial branch for projects hosted on that instance. Individual customize the initial branch for projects hosted on that instance. Individual
...@@ -75,25 +74,6 @@ Projects created on this instance after you change the setting use the ...@@ -75,25 +74,6 @@ Projects created on this instance after you change the setting use the
custom branch name, unless a group-level or subgroup-level configuration custom branch name, unless a group-level or subgroup-level configuration
overrides it. overrides it.
#### Enable or disable custom initial branch name **(FREE SELF)**
Setting the default initial branch name 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 opt to disable it for your instance.
To disable it:
```ruby
Feature.disable(:global_default_branch_name)
```
To enable it:
```ruby
Feature.enable(:global_default_branch_name)
```
### Group-level custom initial branch name **(FREE)** ### Group-level custom initial branch name **(FREE)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/221014) in GitLab 13.6. > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/221014) in GitLab 13.6.
......
...@@ -12,35 +12,17 @@ RSpec.describe 'admin/application_settings/repository.html.haml' do ...@@ -12,35 +12,17 @@ RSpec.describe 'admin/application_settings/repository.html.haml' do
end end
describe 'default initial branch name' do describe 'default initial branch name' do
context 'when the feature flag is disabled' do it 'has the setting section' do
before do render
stub_feature_flags(global_default_branch_name: false)
end
it 'does not show the setting section' do expect(rendered).to have_css("#js-default-branch-name")
render
expect(rendered).not_to have_css("#js-default-branch-name")
end
end end
context 'when the feature flag is enabled' do it 'renders the correct setting section content' do
before do render
stub_feature_flags(global_default_branch_name: true)
end
it 'has the setting section' do
render
expect(rendered).to have_css("#js-default-branch-name")
end
it 'renders the correct setting section content' do
render
expect(rendered).to have_content("Default initial branch name") expect(rendered).to have_content("Default initial branch name")
expect(rendered).to have_content("Set the default name of the initial branch when creating new repositories through the user interface.") expect(rendered).to have_content("Set the default name of the initial branch when creating new repositories through the user interface.")
end
end end
end end
end end
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