2018-10-11 20:12:21 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-19 13:04:14 +00:00
|
|
|
module Gitlab
|
|
|
|
module Checks
|
2018-02-02 15:27:30 +00:00
|
|
|
class ProjectCreated < PostPushMessage
|
2018-01-25 12:26:52 +00:00
|
|
|
PROJECT_CREATED = "project_created".freeze
|
2018-01-19 13:04:14 +00:00
|
|
|
|
2018-01-26 14:28:08 +00:00
|
|
|
def message
|
2018-02-02 15:27:30 +00:00
|
|
|
<<~MESSAGE
|
2018-01-19 13:04:14 +00:00
|
|
|
|
2018-02-02 15:27:30 +00:00
|
|
|
The private project #{project.full_path} was successfully created.
|
2018-01-19 13:04:14 +00:00
|
|
|
|
|
|
|
To configure the remote, run:
|
2018-01-26 14:28:08 +00:00
|
|
|
git remote add origin #{url_to_repo}
|
2018-01-19 13:04:14 +00:00
|
|
|
|
|
|
|
To view the project, visit:
|
|
|
|
#{project_url}
|
|
|
|
|
|
|
|
MESSAGE
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
2018-01-26 14:28:08 +00:00
|
|
|
def self.message_key(user_id, project_id)
|
2018-01-25 12:26:52 +00:00
|
|
|
"#{PROJECT_CREATED}:#{user_id}:#{project_id}"
|
2018-01-19 13:04:14 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def project_url
|
|
|
|
Gitlab::Routing.url_helpers.project_url(project)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|