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