BigW Consortium Gitlab

Commit 5255a54d by James Lopez

refactored some stuff based on MR feedback

parent 20e79f71
......@@ -106,7 +106,7 @@ class GitPushService < BaseService
def build_push_data
@push_data ||= Gitlab::PushDataBuilder.
build(@project, current_user, params[:oldrev], params[:newrev], params[:ref], push_commits)
build(@project, current_user, params[:oldrev], params[:newrev], params[:ref], push_commits)
end
def push_to_existing_branch?
......@@ -128,7 +128,7 @@ class GitPushService < BaseService
def is_default_branch?
Gitlab::Git.branch_ref?(params[:ref]) &&
(Gitlab::Git.ref_name(params[:ref]) == project.default_branch || project.default_branch.nil?)
(Gitlab::Git.ref_name(params[:ref]) == project.default_branch || project.default_branch.nil?)
end
def commit_user(commit)
......@@ -136,6 +136,6 @@ class GitPushService < BaseService
end
def branch_name
@_branch_name ||= Gitlab::Git.ref_name(params[:ref])
@branch_name ||= Gitlab::Git.ref_name(params[:ref])
end
end
......@@ -38,12 +38,7 @@ class PostReceive
if Gitlab::Git.tag_ref?(ref)
GitTagPushService.new.execute(project, @user, oldrev, newrev, ref)
else
GitPushService.new(project, @user,
{
oldrev: oldrev,
newrev: newrev,
ref: ref
}).execute
GitPushService.new(project, @user, oldrev: oldrev, newrev: newrev, ref: ref).execute
end
end
end
......
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