More consistent method naming.

This commit is contained in:
Douwe Maan 2015-03-13 14:55:38 +01:00
parent 84d28209b6
commit f2024b1e06
2 changed files with 8 additions and 5 deletions

View File

@ -53,7 +53,8 @@ class GitPushService
process_commit_messages(ref)
end
@push_data = post_receive_data(oldrev, newrev, ref)
@push_data = build_push_data(oldrev, newrev, ref)
EventCreateService.new.push(project, user, @push_data)
project.execute_hooks(@push_data.dup, :push_hooks)
project.execute_services(@push_data.dup, :push_hooks)
@ -101,7 +102,7 @@ class GitPushService
end
end
def post_receive_data(oldrev, newrev, ref)
def build_push_data(oldrev, newrev, ref)
Gitlab::PushDataBuilder.
build(project, user, oldrev, newrev, ref, push_commits)
end

View File

@ -3,19 +3,21 @@ class GitTagPushService
def execute(project, user, oldrev, newrev, ref)
@project, @user = project, user
@push_data = create_push_data(oldrev, newrev, ref)
@push_data = build_push_data(oldrev, newrev, ref)
EventCreateService.new.push(project, user, @push_data)
project.repository.expire_cache
project.execute_hooks(@push_data.dup, :tag_push_hooks)
project.execute_services(@push_data.dup, :tag_push_hooks)
project.repository.expire_cache
true
end
private
def create_push_data(oldrev, newrev, ref)
def build_push_data(oldrev, newrev, ref)
Gitlab::PushDataBuilder.build(project, user, oldrev, newrev, ref, [])
end
end