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>2019-12-24 12:07:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 12:07:44 +0300
commit6593f1f627938f22090dec5221476772d3ed581d (patch)
treeac5b9adf00f24f1d7cbc59c7d78f7c4fd06a0001 /config/routes/repository_scoped.rb
parent2f369bd95866b7f623387ce2b6acf646df3d5222 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config/routes/repository_scoped.rb')
-rw-r--r--config/routes/repository_scoped.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/config/routes/repository_scoped.rb b/config/routes/repository_scoped.rb
new file mode 100644
index 00000000000..c6343039d62
--- /dev/null
+++ b/config/routes/repository_scoped.rb
@@ -0,0 +1,34 @@
+# frozen_string_literal: true
+
+# All routing related to repository browsing
+# that is already under /-/ scope only
+
+# Don't use format parameter as file extension (old 3.0.x behavior)
+# See http://guides.rubyonrails.org/routing.html#route-globbing-and-wildcard-segments
+scope format: false do
+ scope constraints: { id: Gitlab::PathRegex.git_reference_regex } do
+ resources :network, only: [:show]
+
+ resources :graphs, only: [:show] do
+ member do
+ get :charts
+ get :commits
+ get :ci
+ get :languages
+ end
+ end
+
+ get '/branches/:state', to: 'branches#index', as: :branches_filtered, constraints: { state: /active|stale|all/ }
+ resources :branches, only: [:index, :new, :create, :destroy] do
+ get :diverging_commit_counts, on: :collection
+ 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 :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
+end