diff options
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/group.rb | 1 | ||||
-rw-r--r-- | config/routes/project.rb | 15 | ||||
-rw-r--r-- | config/routes/repository.rb | 7 |
3 files changed, 18 insertions, 5 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb index d89a714c7d6..170508e893d 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -24,6 +24,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do constraints: { group_id: Gitlab::PathRegex.full_namespace_route_regex }) do namespace :settings do resource :ci_cd, only: [:show], controller: 'ci_cd' + resources :badges, only: [:index] end resource :variables, only: [:show, :update] diff --git a/config/routes/project.rb b/config/routes/project.rb index 48ba8ef06f9..2a1bcb8cde2 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -88,6 +88,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end + resources :deploy_tokens, constraints: { id: /\d+/ }, only: [] do + member do + put :revoke + end + end + resources :forks, only: [:index, :new, :create] resource :import, only: [:new, :create, :show] @@ -249,6 +255,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end scope '-' do + get 'archive/*id', constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+?/ }, to: 'repositories#archive', as: 'archive' + resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do collection do post :cancel_all @@ -420,11 +428,14 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end namespace :settings do get :members, to: redirect("%{namespace_id}/%{project_id}/project_members") - resource :ci_cd, only: [:show], controller: 'ci_cd' do + resource :ci_cd, only: [:show, :update], controller: 'ci_cd' do post :reset_cache end resource :integrations, only: [:show] - resource :repository, only: [:show], controller: :repository + resource :repository, only: [:show], controller: :repository do + post :create_deploy_token, path: 'deploy_token/create' + end + resources :badges, only: [:index] end # Since both wiki and repository routing contains wildcard characters diff --git a/config/routes/repository.rb b/config/routes/repository.rb index eace3a615b4..9e506a1a43a 100644 --- a/config/routes/repository.rb +++ b/config/routes/repository.rb @@ -2,10 +2,11 @@ resource :repository, only: [:create] do member do - get ':ref/archive', constraints: { format: Gitlab::PathRegex.archive_formats_regex, ref: /.+/ }, action: 'archive', as: 'archive' - # deprecated since GitLab 9.5 - get 'archive', constraints: { format: Gitlab::PathRegex.archive_formats_regex }, as: 'archive_alternative' + 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 |