2012-07-31 07:32:49 +02:00
|
|
|
class TestHookContext < BaseContext
|
|
|
|
def execute
|
|
|
|
hook = project.hooks.find(params[:id])
|
2013-01-04 07:43:25 +01:00
|
|
|
commits = project.repository.commits(project.default_branch, nil, 3)
|
2012-07-31 07:32:49 +02:00
|
|
|
data = project.post_receive_data(commits.last.id, commits.first.id, "refs/heads/#{project.default_branch}", current_user)
|
|
|
|
hook.execute(data)
|
|
|
|
end
|
|
|
|
end
|