Doesn't trigger Git hooks when cleaning up restored branches from GitHub

parent 22780c4a
...@@ -131,8 +131,10 @@ module Gitlab ...@@ -131,8 +131,10 @@ module Gitlab
def clean_up_restored_branches(branches) def clean_up_restored_branches(branches)
branches.each do |name, _| branches.each do |name, _|
client.delete_ref(repo, "heads/#{name}") client.delete_ref(repo, "heads/#{name}")
project.repository.rm_branch(project.creator, name) project.repository.delete_branch(name) rescue Rugged::ReferenceError
end end
project.repository.after_remove_branch
end end
def apply_labels(issuable) def apply_labels(issuable)
......
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