Commit ec74935e authored by Tetiana Chupryna's avatar Tetiana Chupryna

Merge branch '341836-add-terraform-banner-feature-flag' into 'master'

Make disabling TerraformNotification banner possible

See merge request gitlab-org/gitlab!71462
parents 29e40bc5 361e943b
...@@ -351,7 +351,7 @@ module ProjectsHelper ...@@ -351,7 +351,7 @@ module ProjectsHelper
end end
def show_terraform_banner?(project) def show_terraform_banner?(project)
project.repository_languages.with_programming_language('HCL').exists? && project.terraform_states.empty? Feature.enabled?(:show_terraform_banner, type: :ops, default_enabled: true) && project.repository_languages.with_programming_language('HCL').exists? && project.terraform_states.empty?
end end
def project_permissions_panel_data(project) def project_permissions_panel_data(project)
......
---
name: show_terraform_banner
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71462
rollout_issue_url:
milestone: '14.4'
type: ops
group: group::configure
default_enabled: true
...@@ -904,6 +904,14 @@ RSpec.describe ProjectsHelper do ...@@ -904,6 +904,14 @@ RSpec.describe ProjectsHelper do
it { is_expected.to be_falsey } it { is_expected.to be_falsey }
end end
context 'the :show_terraform_banner feature flag is disabled' do
before do
stub_feature_flags(show_terraform_banner: false)
end
it { is_expected.to be_falsey }
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