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/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 03:08:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 03:08:58 +0300
commit79216161b305b8d23b34226d45aa92dbae316cfe (patch)
treefbedafc415fcfb9970968ac17e94a443ce7ce477 /config
parentc1924b863ad66503edbaa3325949bce6b023b737 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r--config/routes/issues.rb22
-rw-r--r--config/routes/project.rb26
2 files changed, 30 insertions, 18 deletions
diff --git a/config/routes/issues.rb b/config/routes/issues.rb
new file mode 100644
index 00000000000..9ac69975690
--- /dev/null
+++ b/config/routes/issues.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+get :issues, to: 'issues#calendar', constraints: lambda { |req| req.format == :ics }
+
+resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do
+ member do
+ post :toggle_subscription
+ post :mark_as_spam
+ post :move
+ put :reorder
+ get :related_branches
+ get :can_create_branch
+ get :realtime_changes
+ post :create_merge_request
+ get :discussions, format: :json
+ end
+
+ collection do
+ post :bulk_update
+ post :import_csv
+ end
+end
diff --git a/config/routes/project.rb b/config/routes/project.rb
index e1950724386..68568db1326 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -401,25 +401,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
- get :issues, to: 'issues#calendar', constraints: lambda { |req| req.format == :ics }
-
- resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do
- member do
- post :toggle_subscription
- post :mark_as_spam
- post :move
- put :reorder
- get :related_branches
- get :can_create_branch
- get :realtime_changes
- post :create_merge_request
- get :discussions, format: :json
- end
+ # Unscoped route. It will be replaced with redirect to /-/issues/
+ # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
+ draw :issues
- collection do
- post :bulk_update
- post :import_csv
- end
+ # To ensure an old unscoped routing is used for the UI we need to
+ # add prefix 'as' to the scope routing and place it below original routing.
+ # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849
+ scope '-', as: 'scoped' do
+ draw :issues
end
resources :notes, only: [:create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do