diff --git a/app/services/create_branch_service.rb b/app/services/create_branch_service.rb
index 5e971c7891c98c8fb7636bf44ec6891566d2fedb..f835f06e72bd03574e08bb5058db3950c2d809e8 100644
--- a/app/services/create_branch_service.rb
+++ b/app/services/create_branch_service.rb
@@ -17,10 +17,13 @@ class CreateBranchService < BaseService
     new_branch = repository.find_branch(branch_name)
 
     if new_branch
-      EventCreateService.new.push_ref(project, current_user, new_branch, 'add')
-      return success(new_branch)
+      push_data = build_push_data(project, current_user, new_branch)
+
+      EventCreateService.new.push(project, current_user, push_data)
+
+      success(new_branch)
     else
-      return error('Invalid reference name')
+      error('Invalid reference name')
     end
   end
 
@@ -29,4 +32,9 @@ class CreateBranchService < BaseService
     out[:branch] = branch
     out
   end
+
+  def build_push_data(project, user, branch)
+    Gitlab::PushDataBuilder.
+      build(project, user, Gitlab::Git::BLANK_SHA, branch.target, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", [])
+  end
 end
diff --git a/app/services/create_tag_service.rb b/app/services/create_tag_service.rb
index 755202310ab4e06aad44971bd4675f7f8abf1411..af4b537cb935fd4af59f0d78e2012e9a5f0f0b10 100644
--- a/app/services/create_tag_service.rb
+++ b/app/services/create_tag_service.rb
@@ -21,9 +21,9 @@ class CreateTagService < BaseService
     new_tag = repository.find_tag(tag_name)
 
     if new_tag
-      EventCreateService.new.push_ref(project, current_user, new_tag, 'add', Gitlab::Git::TAG_REF_PREFIX)
-
       push_data = create_push_data(project, current_user, new_tag)
+
+      EventCreateService.new.push(project, current_user, push_data)
       project.execute_hooks(push_data.dup, :tag_push_hooks)
       project.execute_services(push_data.dup, :tag_push_hooks)
 
diff --git a/app/services/delete_branch_service.rb b/app/services/delete_branch_service.rb
index c26aee2b0aa4ba06aa8ff27e62caceea1da28a38..f2d5ed818c182d29086f43ffc50738d77b4f8592 100644
--- a/app/services/delete_branch_service.rb
+++ b/app/services/delete_branch_service.rb
@@ -25,10 +25,12 @@ class DeleteBranchService < BaseService
     end
 
     if repository.rm_branch(branch_name)
-      EventCreateService.new.push_ref(project, current_user, branch, 'rm')
+      push_data = build_push_data(branch)
+
+      EventCreateService.new.push(project, current_user, push_data)
       success('Branch was removed')
     else
-      return error('Failed to remove branch')
+      error('Failed to remove branch')
     end
   end
 
@@ -43,4 +45,9 @@ class DeleteBranchService < BaseService
     out[:message] = message
     out
   end
+
+  def build_push_data(branch)
+    Gitlab::PushDataBuilder
+      .build(project, current_user, branch.target, Gitlab::Git::BLANK_SHA, "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", [])
+  end
 end
diff --git a/app/services/event_create_service.rb b/app/services/event_create_service.rb
index dc52d6d89df90bb94a485e530b37708696b71d62..103d6b0a08bc4c3af8f385689399f39378715115 100644
--- a/app/services/event_create_service.rb
+++ b/app/services/event_create_service.rb
@@ -62,26 +62,6 @@ class EventCreateService
     create_event(project, current_user, Event::CREATED)
   end
 
-  def push_ref(project, current_user, ref, action = 'add', prefix = Gitlab::Git::BRANCH_REF_PREFIX)
-    commit = project.repository.commit(ref.target)
-
-    if action.to_s == 'add'
-      before = Gitlab::Git::BLANK_SHA
-      after = commit.id
-    else
-      before = commit.id
-      after = Gitlab::Git::BLANK_SHA
-    end
-
-    data = {
-      ref: "#{prefix}#{ref.name}",
-      before: before,
-      after: after
-    }
-
-    push(project, current_user, data)
-  end
-
   def push(project, current_user, push_data)
     create_event(project, current_user, Event::PUSHED, data: push_data)
   end