Commit 12be5cd4 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 5a42ac22 26087e16
092d4e489d7de1dcc38d57a4c667e85df8b8377f 6aabab39e06f8a4f786a99449a49d5f0cb332310
---
title: Add support for .md.erb files in Static Site Editor
merge_request: 42353
author:
type: added
---
name: sse_erb_support
introduced_by_url:
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/235460
group: group::static site editor
type: development
default_enabled: false
...@@ -112,7 +112,8 @@ you list: ...@@ -112,7 +112,8 @@ you list:
## Queue selector (experimental) ## Queue selector (experimental)
> [Introduced](https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/45) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.8. > - [Introduced](https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/45) in [GitLab Starter](https://about.gitlab.com/pricing/) 12.8.
> - [Sidekiq cluster including queue selector moved](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/181) to GitLab [Core](https://about.gitlab.com/pricing/#self-managed) in GitLab 12.10.
CAUTION: **Caution:** CAUTION: **Caution:**
As this is marked as **experimental**, it is subject to change at any As this is marked as **experimental**, it is subject to change at any
...@@ -130,6 +131,9 @@ in a more general way using the following components: ...@@ -130,6 +131,9 @@ in a more general way using the following components:
- Attributes that can be selected. - Attributes that can be selected.
- Operators used to construct a query. - Operators used to construct a query.
When `experimental_queue_selector` is set, all `queue_groups` must be in
the queue selector syntax.
### Available attributes ### Available attributes
- [Introduced](https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/261) in GitLab 13.1, `tags`. - [Introduced](https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/261) in GitLab 13.1, `tags`.
......
...@@ -34,7 +34,7 @@ module Gitlab ...@@ -34,7 +34,7 @@ module Gitlab
delegate :project, to: :repository delegate :project, to: :repository
def supported_extensions def supported_extensions
%w[.md].freeze %w[.md .md.erb].freeze
end end
def commit_id def commit_id
...@@ -50,8 +50,6 @@ module Gitlab ...@@ -50,8 +50,6 @@ module Gitlab
end end
def extension_supported? def extension_supported?
return true if path.end_with?('.md.erb') && Feature.enabled?(:sse_erb_support, project)
supported_extensions.any? { |ext| path.end_with?(ext) } supported_extensions.any? { |ext| path.end_with?(ext) }
end end
......
...@@ -58,25 +58,9 @@ RSpec.describe Gitlab::StaticSiteEditor::Config::GeneratedConfig do ...@@ -58,25 +58,9 @@ RSpec.describe Gitlab::StaticSiteEditor::Config::GeneratedConfig do
) )
end end
context 'when feature flag is enabled' do let(:path) { 'README.md.erb' }
let(:path) { 'FEATURE_ON.md.erb' }
before do it { is_expected.to include(is_supported_content: true) }
stub_feature_flags(sse_erb_support: project)
end
it { is_expected.to include(is_supported_content: true) }
end
context 'when feature flag is disabled' do
let(:path) { 'FEATURE_OFF.md.erb' }
before do
stub_feature_flags(sse_erb_support: false)
end
it { is_expected.to include(is_supported_content: false) }
end
end end
context 'when file path is nested' do context 'when file path is nested' 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