From 9dc93a4519d9d5d7be48ff274127136236a3adb3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Apr 2021 23:50:22 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-11-stable-ee --- config/routes/customers_dot.rb | 7 +++++++ config/routes/group.rb | 2 ++ config/routes/pipelines.rb | 1 - config/routes/project.rb | 32 +++++++++++++++++--------------- config/routes/repository.rb | 10 +--------- 5 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 config/routes/customers_dot.rb (limited to 'config/routes') diff --git a/config/routes/customers_dot.rb b/config/routes/customers_dot.rb new file mode 100644 index 00000000000..d6afb54cae8 --- /dev/null +++ b/config/routes/customers_dot.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +scope '-' do + namespace :customers_dot do + post 'proxy/graphql' => 'proxy#graphql' + end +end diff --git a/config/routes/group.rb b/config/routes/group.rb index e1ae860f6ec..126680a0b44 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -50,6 +50,8 @@ constraints(::Constraints::GroupUrlConstrainer.new) do end end + resources :applications + resources :packages_and_registries, only: [:index] end diff --git a/config/routes/pipelines.rb b/config/routes/pipelines.rb index 0fc308b5e65..1a74abdeaa1 100644 --- a/config/routes/pipelines.rb +++ b/config/routes/pipelines.rb @@ -12,7 +12,6 @@ resources :pipelines, only: [:index, :new, :create, :show, :destroy] do member do get :stage - get :stage_ajax post :cancel post :retry get :builds diff --git a/config/routes/project.rb b/config/routes/project.rb index 21dfe173715..09b212bc1a2 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -50,6 +50,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end + resources :infrastructure_registry, only: [:index], module: :packages + resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do collection do resources :artifacts, only: [] do @@ -397,6 +399,18 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do to: 'web_ide_schemas#show', format: false, as: :schema + + resources :hooks, only: [:index, :create, :edit, :update, :destroy], constraints: { id: /\d+/ } do + member do + post :test + end + + resources :hook_logs, only: [:show] do + member do + post :retry + end + end + end end # End of the /-/ scope. @@ -460,18 +474,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do draw :legacy_builds - resources :hooks, only: [:index, :create, :edit, :update, :destroy], constraints: { id: /\d+/ } do # rubocop: disable Cop/PutProjectRoutesUnderScope - member do - post :test # rubocop:todo Cop/PutProjectRoutesUnderScope - end - - resources :hook_logs, only: [:show] do # rubocop: disable Cop/PutProjectRoutesUnderScope - member do - post :retry # rubocop:todo Cop/PutProjectRoutesUnderScope - end - end - end - resources :container_registry, only: [:index, :destroy, :show], # rubocop: disable Cop/PutProjectRoutesUnderScope controller: 'registry/repositories' @@ -553,7 +555,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # Deprecated unscoped routing. scope as: 'deprecated' do # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849 - draw :pipelines draw :repository # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/29572 @@ -571,12 +572,13 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # Legacy routes. # Introduced in 12.0. # Should be removed with https://gitlab.com/gitlab-org/gitlab/issues/28848. - Gitlab::Routing.redirect_legacy_paths(self, :mirror, :tags, + Gitlab::Routing.redirect_legacy_paths(self, :mirror, :tags, :hooks, :cycle_analytics, :mattermost, :variables, :triggers, :environments, :protected_environments, :error_tracking, :alert_management, :tracing, :serverless, :clusters, :audit_events, :wikis, :merge_requests, - :vulnerability_feedback, :security, :dependencies, :issues) + :vulnerability_feedback, :security, :dependencies, :issues, + :pipelines, :pipeline_schedules) end # rubocop: disable Cop/PutProjectRoutesUnderScope diff --git a/config/routes/repository.rb b/config/routes/repository.rb index 61a407d5a35..58de3d29bb0 100644 --- a/config/routes/repository.rb +++ b/config/routes/repository.rb @@ -2,15 +2,7 @@ # All routing related to repository browsing -resource :repository, only: [:create] do - member do - # deprecated since GitLab 9.5 - get 'archive', constraints: { format: Gitlab::PathRegex.archive_formats_regex }, as: 'archive_alternative', defaults: { append_sha: true } - - # deprecated since GitLab 10.7 - get ':id/archive', constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+/ }, action: 'archive', as: 'archive_deprecated', defaults: { append_sha: true } - end -end +resource :repository, only: [:create] resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do member do -- cgit v1.2.3