Backend Refactoring
This commit is contained in:
parent
69e41250d1
commit
5926bbac12
11 changed files with 151 additions and 78 deletions
8
app/contexts/test_hook_context.rb
Normal file
8
app/contexts/test_hook_context.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class TestHookContext < BaseContext
|
||||
def execute
|
||||
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)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue