summaryrefslogtreecommitdiff
path: root/app/controllers/hooks_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-07-31 08:32:49 +0300
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-07-31 08:32:49 +0300
commit5926bbac12d5831e1ad90964272b96e152a72e34 (patch)
treee222160f8f35e7dd772dbd124eef089592efc9c2 /app/controllers/hooks_controller.rb
parent69e41250d1b1eea609ae63f2702d5888396cba9a (diff)
downloadgitlab-ce-5926bbac12d5831e1ad90964272b96e152a72e34.tar.gz
Backend Refactoring
Diffstat (limited to 'app/controllers/hooks_controller.rb')
-rw-r--r--app/controllers/hooks_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/hooks_controller.rb b/app/controllers/hooks_controller.rb
index ad2fb3ae781..df22b0ba29a 100644
--- a/app/controllers/hooks_controller.rb
+++ b/app/controllers/hooks_controller.rb
@@ -28,10 +28,7 @@ class HooksController < ApplicationController
end
def test
- @hook = @project.hooks.find(params[:id])
- commits = @project.commits(@project.default_branch, nil, 3)
- data = @project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{@project.default_branch}", current_user)
- @hook.execute(data)
+ TestHookContext.new(project, current_user, params).execute
redirect_to :back
end