diff options
author | Nick Thomas <nick@gitlab.com> | 2019-03-12 15:47:01 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-03-25 12:54:48 +0000 |
commit | ed99296edfd09cc2fad187458c18f5c174804270 (patch) | |
tree | 3dfe6714024608c83fce2183ab7901d4506a67d2 | |
parent | 4e045cd5aa0faf6f6279e8d477a15c9072f679b6 (diff) | |
download | gitlab-ce-ed99296edfd09cc2fad187458c18f5c174804270.tar.gz |
Move some logic to a helper method in GitPushService
-rw-r--r-- | app/services/git_push_service.rb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index f387c749a21..15f68fbdf8f 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -22,6 +22,19 @@ class GitPushService < BaseService # 6. Checks if the project's main language has changed # def execute + update_commits + execute_related_hooks + perform_housekeeping + + update_remote_mirrors + update_caches + + update_signatures + end + + protected + + def update_commits project.repository.after_create if project.empty_repo? project.repository.after_push_commit(branch_name) @@ -54,14 +67,6 @@ class GitPushService < BaseService # .gitattributes file update_gitattributes if default_branch? end - - execute_related_hooks - perform_housekeeping - - update_remote_mirrors - update_caches - - update_signatures end def update_gitattributes @@ -123,8 +128,6 @@ class GitPushService < BaseService end end - protected - def update_remote_mirrors return unless project.has_remote_mirror? |