#214: create GitHook on delete of branch

This commit is contained in:
Vokhmin Alexey V 2013-07-11 17:20:22 +04:00
parent 2e33f0038a
commit ff646af607
1 changed files with 3 additions and 3 deletions

View File

@ -33,9 +33,9 @@ module Modules
repo.tags.map(&:name) + repo.branches.map(&:name)
end
def delete_branch(branch_name)
repo.git.native(:branch, {}, '-D', branch_name)
def delete_branch(branch, user)
message = repo.git.native(:branch, {}, '-D', branch.name)
Resque.enqueue(GitHook, owner.uname, name, GitHook::ZERO, sha1, "refs/heads/#{branch.name}", 'commit', "user-#{user.id}", message)
end
def update_file(path, data, options = {})