Skip to content

Move POST create_deploy_token to ci_cd resources

As of 12.9, we have in config/routes/project.rb

      resource :repository, only: [:show], controller: :repository do
        # TODO: Move 'create_deploy_token' here to the ':ci_cd' resource above during 12.9.
        # More details here: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24102#note_287572556
        post :create_deploy_token, path: 'deploy_token/create', to: 'ci_cd#create_deploy_token'
        ...
      end

This route needs to be moved underneath the ci_cd route resource.

In addition to this change:

  • Update also the related path in app/helpers/ci_variables_helper.rb.
  • Remove the test about rerouting in spec/routing/project_routing_spec.rb:802.
Edited by Etienne Baqué