Commit a7720ddb authored by Sean McGivern's avatar Sean McGivern

Remove templates category from group::import

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