Class: Gitlab::Checks::ContainerMoved

Inherits:
PostPushMessage show all
Defined in:
lib/gitlab/checks/container_moved.rb

Constant Summary collapse

REDIRECT_NAMESPACE =
"redirect_namespace"

Instance Method Summary collapse

Methods inherited from PostPushMessage

#add_message, fetch_message

Constructor Details

#initialize(repository, user, protocol, redirected_path) ⇒ ContainerMoved

Returns a new instance of ContainerMoved.



8
9
10
11
12
# File 'lib/gitlab/checks/container_moved.rb', line 8

def initialize(repository, user, protocol, redirected_path)
  @redirected_path = redirected_path

  super(repository, user, protocol)
end

Instance Method Details

#messageObject



14
15
16
17
18
19
20
21
22
# File 'lib/gitlab/checks/container_moved.rb', line 14

def message
  <<~MESSAGE
  #{container.class.model_name.human} '#{redirected_path}' was moved to '#{container.full_path}'.

  Please update your Git remote:

    git remote set-url origin #{url_to_repo}
  MESSAGE
end