Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-02-26 19:02:28 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-02-26 19:02:28 +0300
commit13c723f1dd99a6488df0efc89f46cdae1e57126d (patch)
tree55d0bb4af6cd99695cc8a5f03d011d027475f7c4 /lib
parentf26cd63b0f7e9acc29a72d81ad2ed327ac93b816 (diff)
parentf49aeacdd0b20cc270423409efaf82b26ced4836 (diff)
Merge branch 'ce-revert-d5ce84fd' into 'master'
Revert "Merge branch 'revert-82d7b5a0-ce' into 'master'" Closes #57857 and #50747 See merge request gitlab-org/gitlab-ce!25559
Diffstat (limited to 'lib')
-rw-r--r--lib/api/issues.rb1
-rw-r--r--lib/api/project_templates.rb5
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/issues.rb b/lib/api/issues.rb
index 94ed9ac6fb1..f43f4d961d6 100644
--- a/lib/api/issues.rb
+++ b/lib/api/issues.rb
@@ -54,6 +54,7 @@ module API
optional :scope, type: String, values: %w[created-by-me assigned-to-me created_by_me assigned_to_me all],
desc: 'Return issues for the given scope: `created_by_me`, `assigned_to_me` or `all`'
optional :my_reaction_emoji, type: String, desc: 'Return issues reacted by the authenticated user by the given emoji'
+ optional :confidential, type: Boolean, desc: 'Filter confidential or public issues'
use :pagination
use :issues_params_ee
diff --git a/lib/api/project_templates.rb b/lib/api/project_templates.rb
index d05ddad7466..119902a189c 100644
--- a/lib/api/project_templates.rb
+++ b/lib/api/project_templates.rb
@@ -36,7 +36,10 @@ module API
optional :project, type: String, desc: 'The project name to use when expanding placeholders in the template. Only affects licenses'
optional :fullname, type: String, desc: 'The full name of the copyright holder to use when expanding placeholders in the template. Only affects licenses'
end
- get ':id/templates/:type/:name', requirements: { name: /[\w\.-]+/ } do
+ # The regex is needed to ensure a period (e.g. agpl-3.0)
+ # isn't confused with a format type. We also need to allow encoded
+ # values (e.g. C%2B%2B for C++), so allow % and + as well.
+ get ':id/templates/:type/:name', requirements: { name: /[\w%.+-]+/ } do
template = TemplateFinder
.build(params[:type], user_project, name: params[:name])
.execute