diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-02 18:27:30 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-02-06 19:52:29 +0300 |
commit | 1e56b3f476f9779ec747534e94156a6b8076209c (patch) | |
tree | e9374a520232a2d96ef55bf3089dd5350db0a900 /lib/gitlab/checks | |
parent | 839829a7786dd163eccb470bf251211bfb90bd72 (diff) |
Moves project creationg to git access check for git push
Diffstat (limited to 'lib/gitlab/checks')
-rw-r--r-- | lib/gitlab/checks/post_push_message.rb (renamed from lib/gitlab/checks/base_project.rb) | 2 | ||||
-rw-r--r-- | lib/gitlab/checks/project_created.rb | 6 | ||||
-rw-r--r-- | lib/gitlab/checks/project_moved.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/checks/base_project.rb b/lib/gitlab/checks/post_push_message.rb index dd6c007b356..473c0385b34 100644 --- a/lib/gitlab/checks/base_project.rb +++ b/lib/gitlab/checks/post_push_message.rb @@ -1,6 +1,6 @@ module Gitlab module Checks - class BaseProject + class PostPushMessage def initialize(project, user, protocol) @project = project @user = user diff --git a/lib/gitlab/checks/project_created.rb b/lib/gitlab/checks/project_created.rb index bd1e204bc81..cec270d6a58 100644 --- a/lib/gitlab/checks/project_created.rb +++ b/lib/gitlab/checks/project_created.rb @@ -1,12 +1,12 @@ module Gitlab module Checks - class ProjectCreated < BaseProject + class ProjectCreated < PostPushMessage PROJECT_CREATED = "project_created".freeze def message - <<~MESSAGE.strip_heredoc + <<~MESSAGE - The private project #{project.full_path} was created. + The private project #{project.full_path} was successfully created. To configure the remote, run: git remote add origin #{url_to_repo} diff --git a/lib/gitlab/checks/project_moved.rb b/lib/gitlab/checks/project_moved.rb index eca59e88e24..3263790a876 100644 --- a/lib/gitlab/checks/project_moved.rb +++ b/lib/gitlab/checks/project_moved.rb @@ -1,6 +1,6 @@ module Gitlab module Checks - class ProjectMoved < BaseProject + class ProjectMoved < PostPushMessage REDIRECT_NAMESPACE = "redirect_namespace".freeze def initialize(project, user, protocol, redirected_path) @@ -10,7 +10,7 @@ module Gitlab end def message(rejected: false) - <<~MESSAGE.strip_heredoc + <<~MESSAGE Project '#{redirected_path}' was moved to '#{project.full_path}'. Please update your Git remote: |