Skip to content
Snippets Groups Projects
Commit 79f0858a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Services and hooks MUST BE executed on branch push!

parent c2f10400
No related branches found
No related tags found
1 merge request!5081fixed command to update init script
Loading
Loading
@@ -30,6 +30,9 @@ class GitPushService
if push_to_existing_branch?(ref, oldrev)
project.update_merge_requests(oldrev, newrev, ref, @user)
process_commit_messages(ref)
end
if push_to_branch?(ref)
project.execute_hooks(@push_data.dup)
project.execute_services(@push_data.dup)
end
Loading
Loading
@@ -175,6 +178,10 @@ class GitPushService
ref_parts[1] =~ /heads/ && oldrev == "0000000000000000000000000000000000000000"
end
 
def push_to_branch? ref
ref =~ /refs\/heads/
end
def is_default_branch? ref
ref == "refs/heads/#{project.default_branch}"
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment