#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) repo.tags.map(&:name) + repo.branches.map(&:name)
end end
def delete_branch(branch_name) def delete_branch(branch, user)
repo.git.native(:branch, {}, '-D', branch_name) 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 end
def update_file(path, data, options = {}) def update_file(path, data, options = {})