Class: Gitlab::Checks::ProjectMoved

Inherits:
PostPushMessage show all
Defined in:
lib/gitlab/checks/project_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) ⇒ ProjectMoved

Returns a new instance of ProjectMoved.


8
9
10
11
12
# File 'lib/gitlab/checks/project_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/project_moved.rb', line 14

def message
  <<~MESSAGE
  Project '#{redirected_path}' was moved to '#{project.full_path}'.

  Please update your Git remote:

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