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:
authorDouwe Maan <douwe@gitlab.com>2018-04-06 17:14:39 +0300
committerDouwe Maan <douwe@gitlab.com>2018-04-06 17:14:39 +0300
commit44f4a674e2a87d104f700265d835aba000c589f0 (patch)
tree1766e8c5a220fed40333c42e8db8ee02494da224 /config
parentfe17613dec7ce0c97ca2c487f27352532968f757 (diff)
parent07f517d441ab8782286b4a59d56a630393d75e16 (diff)
Merge branch 'jramsay-38830-tarball' into 'master'
Add alternative archive route Closes #38830 See merge request gitlab-org/gitlab-ce!17225
Diffstat (limited to 'config')
-rw-r--r--config/routes/project.rb2
-rw-r--r--config/routes/repository.rb7
2 files changed, 6 insertions, 3 deletions
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 0f2ea1c01d1..618c7897060 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -249,6 +249,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
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