Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
23be6b41
Commit
23be6b41
authored
Jul 30, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
93e6c4d3
0249cdee
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
app/controllers/projects/templates_controller.rb
app/controllers/projects/templates_controller.rb
+1
-1
config/feature_categories.yml
config/feature_categories.yml
+0
-1
ee/app/workers/all_queues.yml
ee/app/workers/all_queues.yml
+1
-1
ee/app/workers/project_template_export_worker.rb
ee/app/workers/project_template_export_worker.rb
+1
-1
lib/api/project_templates.rb
lib/api/project_templates.rb
+1
-1
lib/api/templates.rb
lib/api/templates.rb
+10
-9
No files found.
app/controllers/projects/templates_controller.rb
View file @
23be6b41
...
...
@@ -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
)
...
...
config/feature_categories.yml
View file @
23be6b41
...
...
@@ -120,7 +120,6 @@
-
static_site_editor
-
subgroups
-
synthetic_monitoring
-
templates
-
time_tracking
-
tracing
-
usability_testing
...
...
ee/app/workers/all_queues.yml
View file @
23be6b41
...
...
@@ -1157,7 +1157,7 @@
- :needs_own_queue
-
:name: project_template_export
:worker_name: ProjectTemplateExportWorker
:feature_category: :
template
s
:feature_category: :
importer
s
:has_external_dependencies:
:urgency: :low
:resource_boundary: :unknown
...
...
ee/app/workers/project_template_export_worker.rb
View file @
23be6b41
...
...
@@ -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
:
template
s
feature_category
:
importer
s
tags
:exclude_from_kubernetes
loggable_arguments
2
,
3
sidekiq_options
retry:
false
,
dead:
false
...
...
lib/api/project_templates.rb
View file @
23be6b41
...
...
@@ -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'
...
...
lib/api/templates.rb
View file @
23be6b41
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment