Commit 57ac5fe9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Procfile added. use foreman start to run gitlabhq

parent 2d3b6375
port: 9999
web: bundle exec rails s -p $PORT
worker: bundle exec rake environment resque:work QUEUE=*
...@@ -29,6 +29,15 @@ class HooksController < ApplicationController ...@@ -29,6 +29,15 @@ class HooksController < ApplicationController
end end
end end
def test
@hook = @project.web_hooks.find(params[:id])
commits = @project.commits(@project.default_branch, nil, 3)
data = @project.web_hook_data(commits.last.id, commits.first.id, "refs/heads/#{@project.default_branch}")
@hook.execute(data)
redirect_to :back
end
def show def show
@hook = @project.web_hooks.find(params[:id]) @hook = @project.web_hooks.find(params[:id])
end end
......
= render "repositories/head" = render "repositories/head"
= debug @hook %h3= @hook.url
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
.merge-tabs .merge-tabs
= link_to 'Test Hook', test_project_hook_path(@project, @hook), :class => "grey-button"
.right .right
= link_to 'Remove', project_hook_path(@project, @hook), :confirm => 'Are you sure?', :method => :delete, :class => "red-button" = link_to 'Remove', project_hook_path(@project, @hook), :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
...@@ -85,7 +85,11 @@ Gitlab::Application.routes.draw do ...@@ -85,7 +85,11 @@ Gitlab::Application.routes.draw do
end end
resources :snippets resources :snippets
resources :hooks, :only => [:index, :new, :create, :destroy, :show] resources :hooks, :only => [:index, :new, :create, :destroy, :show] do
member do
get :test
end
end
resources :commits resources :commits
resources :team_members resources :team_members
resources :issues do resources :issues do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment