Commit 0249cdee authored by Tetiana Chupryna's avatar Tetiana Chupryna

Merge branch 'update-feature-categories-2021-07-29' into 'master'

Remove templates category from group::import

See merge request gitlab-org/gitlab!67134
parents 6154daf1 a7720ddb
...@@ -5,7 +5,7 @@ class Projects::TemplatesController < Projects::ApplicationController ...@@ -5,7 +5,7 @@ class Projects::TemplatesController < Projects::ApplicationController
before_action :authorize_can_read_issuable! before_action :authorize_can_read_issuable!
before_action :get_template_class before_action :get_template_class
feature_category :templates feature_category :source_code_management
def index def index
templates = @template_type.template_subsets(project) templates = @template_type.template_subsets(project)
......
...@@ -120,7 +120,6 @@ ...@@ -120,7 +120,6 @@
- static_site_editor - static_site_editor
- subgroups - subgroups
- synthetic_monitoring - synthetic_monitoring
- templates
- time_tracking - time_tracking
- tracing - tracing
- usability_testing - usability_testing
......
...@@ -1157,7 +1157,7 @@ ...@@ -1157,7 +1157,7 @@
- :needs_own_queue - :needs_own_queue
- :name: project_template_export - :name: project_template_export
:worker_name: ProjectTemplateExportWorker :worker_name: ProjectTemplateExportWorker
:feature_category: :templates :feature_category: :importers
:has_external_dependencies: :has_external_dependencies:
:urgency: :low :urgency: :low
:resource_boundary: :unknown :resource_boundary: :unknown
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# since project_export queue can get congested by export requests # since project_export queue can get congested by export requests
# which significantly delays project creation from custom templates. # which significantly delays project creation from custom templates.
class ProjectTemplateExportWorker < ProjectExportWorker # rubocop:disable Scalability/IdempotentWorker class ProjectTemplateExportWorker < ProjectExportWorker # rubocop:disable Scalability/IdempotentWorker
feature_category :templates feature_category :importers
tags :exclude_from_kubernetes tags :exclude_from_kubernetes
loggable_arguments 2, 3 loggable_arguments 2, 3
sidekiq_options retry: false, dead: false sidekiq_options retry: false, dead: false
......
...@@ -12,7 +12,7 @@ module API ...@@ -12,7 +12,7 @@ module API
before { authenticate_non_get! } before { authenticate_non_get! }
feature_category :templates feature_category :source_code_management
params do params do
requires :id, type: String, desc: 'The ID of a project' requires :id, type: String, desc: 'The ID of a project'
......
...@@ -4,17 +4,18 @@ module API ...@@ -4,17 +4,18 @@ module API
class Templates < ::API::Base class Templates < ::API::Base
include PaginationParams include PaginationParams
feature_category :templates
GLOBAL_TEMPLATE_TYPES = { GLOBAL_TEMPLATE_TYPES = {
gitignores: { gitignores: {
gitlab_version: 8.8 gitlab_version: 8.8,
feature_category: :source_code_management
}, },
gitlab_ci_ymls: { gitlab_ci_ymls: {
gitlab_version: 8.9 gitlab_version: 8.9,
feature_category: :continuous_integration
}, },
dockerfiles: { dockerfiles: {
gitlab_version: 8.15 gitlab_version: 8.15,
feature_category: :source_code_management
} }
}.freeze }.freeze
...@@ -33,7 +34,7 @@ module API ...@@ -33,7 +34,7 @@ module API
optional :popular, type: Boolean, desc: 'If passed, returns only popular licenses' optional :popular, type: Boolean, desc: 'If passed, returns only popular licenses'
use :pagination use :pagination
end end
get "templates/licenses" do get "templates/licenses", feature_category: :source_code_management do
popular = declared(params)[:popular] popular = declared(params)[:popular]
popular = to_boolean(popular) if popular.present? popular = to_boolean(popular) if popular.present?
...@@ -49,7 +50,7 @@ module API ...@@ -49,7 +50,7 @@ module API
params do params do
requires :name, type: String, desc: 'The name of the template' requires :name, type: String, desc: 'The name of the template'
end end
get "templates/licenses/:name", requirements: { name: /[\w\.-]+/ } do get "templates/licenses/:name", requirements: { name: /[\w\.-]+/ }, feature_category: :source_code_management do
template = TemplateFinder.build(:licenses, nil, name: params[:name]).execute template = TemplateFinder.build(:licenses, nil, name: params[:name]).execute
not_found!('License') unless template.present? not_found!('License') unless template.present?
...@@ -72,7 +73,7 @@ module API ...@@ -72,7 +73,7 @@ module API
params do params do
use :pagination use :pagination
end end
get "templates/#{template_type}" do get "templates/#{template_type}", feature_category: properties[:feature_category] do
templates = ::Kaminari.paginate_array(TemplateFinder.build(template_type, nil).execute) templates = ::Kaminari.paginate_array(TemplateFinder.build(template_type, nil).execute)
present paginate(templates), with: Entities::TemplatesList present paginate(templates), with: Entities::TemplatesList
end end
...@@ -84,7 +85,7 @@ module API ...@@ -84,7 +85,7 @@ module API
params do params do
requires :name, type: String, desc: 'The name of the template' requires :name, type: String, desc: 'The name of the template'
end end
get "templates/#{template_type}/:name", requirements: { name: /[\w\.-]+/ } do get "templates/#{template_type}/:name", requirements: { name: /[\w\.-]+/ }, feature_category: properties[:feature_category] do
finder = TemplateFinder.build(template_type, nil, name: declared(params)[:name]) finder = TemplateFinder.build(template_type, nil, name: declared(params)[:name])
new_template = finder.execute new_template = finder.execute
......
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