Support repository moved message with all container types

Summary

We have a push check to add a message to the Git output if the repository URL has moved: https://gitlab.com/gitlab-org/gitlab/blob/bd145786b4ef897f0eac4aeabc56be61918be7a3/lib/gitlab/checks/project_moved.rb

Follow-up from #207869 (closed).

Improvements

This should be generalized so it works with all container types.

Involved components

  • app/services/post_receive_service.rb
  • lib/gitlab/checks/project_moved.rb
  • lib/gitlab/git_access.rb
  • lib/gitlab/repo_path.rb
Edited by Markus Koller