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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 11:17:02 +0300
commitb39512ed755239198a9c294b6a45e65c05900235 (patch)
treed234a3efade1de67c46b9e5a38ce813627726aa7 /config/routes
parentd31474cf3b17ece37939d20082b07f6657cc79a9 (diff)
Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42
Diffstat (limited to 'config/routes')
-rw-r--r--config/routes/admin.rb1
-rw-r--r--config/routes/development.rb1
-rw-r--r--config/routes/profile.rb8
-rw-r--r--config/routes/project.rb12
-rw-r--r--config/routes/repository.rb5
-rw-r--r--config/routes/unmatched_project.rb8
-rw-r--r--config/routes/uploads.rb18
-rw-r--r--config/routes/user.rb2
8 files changed, 30 insertions, 25 deletions
diff --git a/config/routes/admin.rb b/config/routes/admin.rb
index bbf00cd0b00..2f4e286f5eb 100644
--- a/config/routes/admin.rb
+++ b/config/routes/admin.rb
@@ -65,6 +65,7 @@ namespace :admin do
resource :avatar, controller: 'topics/avatars', only: [:destroy]
collection do
post :preview_markdown
+ post :merge
end
end
diff --git a/config/routes/development.rb b/config/routes/development.rb
index 4ea53e14120..34f4eb5556b 100644
--- a/config/routes/development.rb
+++ b/config/routes/development.rb
@@ -12,4 +12,5 @@ if Rails.env.development?
get '/rails/info' => 'rails/info#index'
mount LetterOpenerWeb::Engine, at: '/rails/letter_opener'
+ mount Lookbook::Engine, at: '/rails/lookbook'
end
diff --git a/config/routes/profile.rb b/config/routes/profile.rb
index b8d4a0c49c2..91f6eb678e4 100644
--- a/config/routes/profile.rb
+++ b/config/routes/profile.rb
@@ -23,10 +23,10 @@ resource :profile, only: [:show, :update] do
resource :notifications, only: [:show, :update] do
scope(path: 'groups/*id',
- id: Gitlab::PathRegex.full_namespace_route_regex,
- as: :group,
- controller: :groups,
- constraints: { format: /(html|json)/ }) do
+ id: Gitlab::PathRegex.full_namespace_route_regex,
+ as: :group,
+ controller: :groups,
+ constraints: { format: /(html|json)/ }) do
patch '/', action: :update
put '/', action: :update
end
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 5eb0b9396c9..53d9be13611 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -29,7 +29,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
# "Route Globbing" syntax (/*page) so that the route helpers do not encode
# the slash character.
get 'metrics(/:dashboard_path)(/*page)', constraints: { dashboard_path: /.+\.yml/, page: 'panel/new' },
- to: 'metrics_dashboard#show', as: :metrics_dashboard, format: false
+ to: 'metrics_dashboard#show', as: :metrics_dashboard, format: false
namespace :metrics, module: :metrics do
namespace :dashboards do
@@ -96,7 +96,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
namespace :ci do
resource :lint, only: [:show, :create]
resource :pipeline_editor, only: [:show], controller: :pipeline_editor, path: 'editor'
- resource :secure_files, only: [:show], controller: :secure_files, path: 'secure_files'
resources :daily_build_group_report_results, only: [:index], constraints: { format: /(csv|json)/ }
namespace :prometheus_metrics do
resources :histograms, only: [:create], constraints: { format: 'json' }
@@ -157,7 +156,9 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
- resource :packages_and_registries, only: [:show]
+ resource :packages_and_registries, only: [:show] do
+ get '/cleanup_image_tags', to: 'packages_and_registries#cleanup_tags'
+ end
end
resources :usage_quotas, only: [:index]
@@ -299,6 +300,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
resources :terraform, only: [:index]
namespace :google_cloud do
+ get '/', to: redirect('%{namespace_id}/%{project_id}/-/google_cloud/configuration')
+
get '/configuration', to: 'configuration#index'
resources :revoke_oauth, only: [:create]
@@ -358,6 +361,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
get 'alert_management/:id', to: 'alert_management#details', as: 'alert_management_alert'
get 'work_items/*work_items_path' => 'work_items#index', as: :work_items
+ get 'work_items/*work_items_path' => 'work_items#index', as: :work_item
post 'incidents/integrations/pagerduty', to: 'incident_management/pager_duty_incidents#create'
@@ -499,7 +503,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
defaults: { format: 'json' },
constraints: { template_type: %r{issue|merge_request}, format: 'json' }
- resource :pages, only: [:show, :update, :destroy] do # rubocop: disable Cop/PutProjectRoutesUnderScope
+ resource :pages, only: [:new, :show, :update, :destroy] do # rubocop: disable Cop/PutProjectRoutesUnderScope
resources :domains, except: :index, controller: 'pages_domains', constraints: { id: %r{[^/]+} } do # rubocop: disable Cop/PutProjectRoutesUnderScope
member do
post :verify # rubocop:todo Cop/PutProjectRoutesUnderScope
diff --git a/config/routes/repository.rb b/config/routes/repository.rb
index 74e72927699..0202eb80b23 100644
--- a/config/routes/repository.rb
+++ b/config/routes/repository.rb
@@ -51,10 +51,7 @@ scope format: false do
end
delete :merged_branches, controller: 'branches', action: :destroy_all_merged
- resources :tags, only: [:index, :show, :new, :create, :destroy] do
- resource :release, controller: 'tags/releases', only: [:edit, :update]
- end
-
+ resources :tags, only: [:index, :show, :new, :create, :destroy]
resources :protected_branches, only: [:index, :show, :create, :update, :destroy, :patch], constraints: { id: Gitlab::PathRegex.git_reference_regex }
resources :protected_tags, only: [:index, :show, :create, :update, :destroy]
end
diff --git a/config/routes/unmatched_project.rb b/config/routes/unmatched_project.rb
index b4fe243c7b0..3f94af33e18 100644
--- a/config/routes/unmatched_project.rb
+++ b/config/routes/unmatched_project.rb
@@ -1,11 +1,11 @@
# frozen_string_literal: true
scope(path: '*namespace_id',
- as: :namespace,
- namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do
+ as: :namespace,
+ namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do
scope(path: ':project_id',
- constraints: { project_id: Gitlab::PathRegex.project_route_regex },
- as: :project) do
+ constraints: { project_id: Gitlab::PathRegex.project_route_regex },
+ as: :project) do
post '*all', to: 'application#route_not_found'
put '*all', to: 'application#route_not_found'
patch '*all', to: 'application#route_not_found'
diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb
index a72730c1214..ba2e8493ef9 100644
--- a/config/routes/uploads.rb
+++ b/config/routes/uploads.rb
@@ -3,8 +3,8 @@
scope path: :uploads do
# Note attachments and User/Group/Project/Topic avatars
get "-/system/:model/:mounted_as/:id/:filename",
- to: "uploads#show",
- constraints: { model: %r{note|user|group|project|projects\/topic}, mounted_as: /avatar|attachment/, filename: %r{[^/]+} }
+ to: "uploads#show",
+ constraints: { model: %r{note|user|group|project|projects\/topic}, mounted_as: /avatar|attachment/, filename: %r{[^/]+} }
# show uploads for models, snippets (notes) available for now
get '-/system/:model/:id/:secret/:filename',
@@ -18,8 +18,8 @@ scope path: :uploads do
# Appearance
get "-/system/:model/:mounted_as/:id/:filename",
- to: "uploads#show",
- constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ },
+ to: "uploads#show",
+ constraints: { model: /appearance/, mounted_as: /logo|header_logo|favicon/, filename: /.+/ },
as: 'appearance_upload'
# Project markdown uploads
@@ -27,7 +27,7 @@ scope path: :uploads do
# https://gitlab.com/gitlab-org/gitlab/issues/196396
get ":namespace_id/:project_id/:secret/:filename",
to: redirect("%{namespace_id}/%{project_id}/uploads/%{secret}/%{filename}"),
- constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }, format: false, defaults: { format: nil }
+ constraints: { namespace_id: /[a-zA-Z.0-9_\-]+/, project_id: /[a-zA-Z.0-9_\-]+/, filename: %r{[^/]+} }, format: false, defaults: { format: nil }
# create uploads for models, snippets (notes) available for now
post ':model',
@@ -41,12 +41,12 @@ scope path: :uploads do
# Alert Metric Images
get "-/system/:model/:mounted_as/:id/:filename",
- to: "uploads#show",
- constraints: { model: /alert_management_metric_image/, mounted_as: /file/, filename: %r{[^/]+} },
+ to: "uploads#show",
+ constraints: { model: /alert_management_metric_image/, mounted_as: /file/, filename: %r{[^/]+} },
as: 'alert_metric_image_upload'
end
# Redirect old note attachments path to new uploads path.
get "files/note/:id/:filename",
- to: redirect("uploads/note/attachment/%{id}/%{filename}"),
- constraints: { filename: %r{[^/]+} }
+ to: redirect("uploads/note/attachment/%{id}/%{filename}"),
+ constraints: { filename: %r{[^/]+} }
diff --git a/config/routes/user.rb b/config/routes/user.rb
index 96e8c850da4..a9e0d7df88f 100644
--- a/config/routes/user.rb
+++ b/config/routes/user.rb
@@ -64,7 +64,9 @@ scope '-/users', module: :users do
end
resources :callouts, only: [:create]
+ resources :namespace_callouts, only: [:create]
resources :group_callouts, only: [:create]
+ resources :project_callouts, only: [:create]
end
scope(constraints: { username: Gitlab::PathRegex.root_namespace_route_regex }) do