Commit ed99296e authored by Nick Thomas's avatar Nick Thomas

Move some logic to a helper method in GitPushService

parent 4e045cd5
...@@ -22,6 +22,19 @@ class GitPushService < BaseService ...@@ -22,6 +22,19 @@ class GitPushService < BaseService
# 6. Checks if the project's main language has changed # 6. Checks if the project's main language has changed
# #
def execute 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_create if project.empty_repo?
project.repository.after_push_commit(branch_name) project.repository.after_push_commit(branch_name)
...@@ -54,14 +67,6 @@ class GitPushService < BaseService ...@@ -54,14 +67,6 @@ class GitPushService < BaseService
# .gitattributes file # .gitattributes file
update_gitattributes if default_branch? update_gitattributes if default_branch?
end end
execute_related_hooks
perform_housekeeping
update_remote_mirrors
update_caches
update_signatures
end end
def update_gitattributes def update_gitattributes
...@@ -123,8 +128,6 @@ class GitPushService < BaseService ...@@ -123,8 +128,6 @@ class GitPushService < BaseService
end end
end end
protected
def update_remote_mirrors def update_remote_mirrors
return unless project.has_remote_mirror? return unless project.has_remote_mirror?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment