Deprecate the create action on Projects::CompareController

From !18038 (comment 225691855):

This can probably go in a separate issue, but it looks like we have both GET and POST requests for the same action. In config/routes/repository.rb:

 get '/compare/:from...:to', to: 'compare#show', as: 'compare', constraints: { from: /.+/, to: /.+/ }

 resources :compare, only: [:index, :create] do
   collection do
     get :diff_for_path
     get :signatures
   end
 end

I'm wondering if we should deprecate the :create case:

$ git grep "project_compare_index_path"
app/controllers/projects/compare_controller.rb:      redirect_to project_compare_index_path(@project, from_to_vars)
app/controllers/projects/compare_controller.rb:    redirect_to project_compare_index_path(@project)
app/views/layouts/nav/sidebar/_project.html.haml:              = link_to project_compare_index_path(@project, from: >@repository.root_ref, to: current_ref) do
app/views/projects/compare/_form.html.haml:= form_tag project_compare_index_path(@project), method: :post, class: 'form-inline >js-requires-input js-signature-container', data: { 'signatures-path' => signatures_namespace_project_compare_index_path } do
app/views/projects/compare/show.html.haml:- add_to_breadcrumbs _("Compare Revisions"), project_compare_index_path(@project)
spec/controllers/projects/compare_controller_spec.rb:          expect(response).to >redirect_to(project_compare_index_path(project, to: target_ref))
spec/controllers/projects/compare_controller_spec.rb:          expect(response).to >redirect_to(project_compare_index_path(project, from: source_ref))
spec/controllers/projects/compare_controller_spec.rb:          expect(response).to >redirect_to(namespace_project_compare_index_path)
spec/features/projects/compare_spec.rb:      visit project_compare_index_path(project, from: "master", to: "master")
spec/features/projects/compare_spec.rb:      visit project_compare_index_path(project, from: "master", to: "master")
spec/features/projects/compare_spec.rb:      visit project_compare_index_path(project)
spec/features/projects/compare_spec.rb:        visit project_compare_index_path(project)
spec/features/projects/compare_spec.rb:      visit project_compare_index_path(project, from: "master", to: "master")
spec/features/projects/compare_spec.rb:        visit project_compare_index_path(project, from: "feature", to: "master")
spec/features/projects/compare_spec.rb:      visit project_compare_index_path(project, from: "master", to: "master")
spec/features/security/project/internal_access_spec.rb:    subject { project_compare_index_path(project) }
spec/features/security/project/private_access_spec.rb:    subject { project_compare_index_path(project) }
spec/features/security/project/public_access_spec.rb:    subject { project_compare_index_path(project) }
Assignee Loading
Time tracking Loading