Commit 5255a54d authored by James Lopez's avatar James Lopez

refactored some stuff based on MR feedback

parent 20e79f71
...@@ -136,6 +136,6 @@ class GitPushService < BaseService ...@@ -136,6 +136,6 @@ class GitPushService < BaseService
end end
def branch_name def branch_name
@_branch_name ||= Gitlab::Git.ref_name(params[:ref]) @branch_name ||= Gitlab::Git.ref_name(params[:ref])
end end
end end
...@@ -38,12 +38,7 @@ class PostReceive ...@@ -38,12 +38,7 @@ class PostReceive
if Gitlab::Git.tag_ref?(ref) if Gitlab::Git.tag_ref?(ref)
GitTagPushService.new.execute(project, @user, oldrev, newrev, ref) GitTagPushService.new.execute(project, @user, oldrev, newrev, ref)
else else
GitPushService.new(project, @user, GitPushService.new(project, @user, oldrev: oldrev, newrev: newrev, ref: ref).execute
{
oldrev: oldrev,
newrev: newrev,
ref: ref
}).execute
end end
end end
end end
......
This diff is collapsed.
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