Commit 15a7e665 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'dz-bring-tags-redirect-back' into 'master'

Add redirect for project tags page

See merge request gitlab-org/gitlab!31924
parents 2f7e88df 03c303d7
...@@ -484,7 +484,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -484,7 +484,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
# Legacy routes. # Legacy routes.
# Introduced in 12.0. # Introduced in 12.0.
# Should be removed with https://gitlab.com/gitlab-org/gitlab/issues/28848. # Should be removed with https://gitlab.com/gitlab-org/gitlab/issues/28848.
Gitlab::Routing.redirect_legacy_paths(self, :mirror, Gitlab::Routing.redirect_legacy_paths(self, :mirror, :tags,
:cycle_analytics, :mattermost, :variables, :triggers, :cycle_analytics, :mattermost, :variables, :triggers,
:environments, :protected_environments, :error_tracking, :alert_management, :environments, :protected_environments, :error_tracking, :alert_management,
:serverless, :clusters, :audit_events, :wikis, :merge_requests, :serverless, :clusters, :audit_events, :wikis, :merge_requests,
......
...@@ -230,6 +230,8 @@ describe 'project routing' do ...@@ -230,6 +230,8 @@ describe 'project routing' do
expect(delete('/gitlab/gitlabhq/-/tags/feature%2B45/foo/bar/baz')).to route_to('projects/tags#destroy', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'feature+45/foo/bar/baz') expect(delete('/gitlab/gitlabhq/-/tags/feature%2B45/foo/bar/baz')).to route_to('projects/tags#destroy', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'feature+45/foo/bar/baz')
expect(delete('/gitlab/gitlabhq/-/tags/feature@45/foo/bar/baz')).to route_to('projects/tags#destroy', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'feature@45/foo/bar/baz') expect(delete('/gitlab/gitlabhq/-/tags/feature@45/foo/bar/baz')).to route_to('projects/tags#destroy', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'feature@45/foo/bar/baz')
end end
it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/tags", "/gitlab/gitlabhq/-/tags"
end end
# project_deploy_keys GET /:project_id/deploy_keys(.:format) deploy_keys#index # project_deploy_keys GET /:project_id/deploy_keys(.:format) deploy_keys#index
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment