Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
57ac5fe9
Commit
57ac5fe9
authored
Jan 08, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Procfile added. use foreman start to run gitlabhq
parent
2d3b6375
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
2 deletions
+19
-2
.foreman
.foreman
+1
-0
Procfile
Procfile
+2
-0
app/controllers/hooks_controller.rb
app/controllers/hooks_controller.rb
+9
-0
app/views/hooks/show.html.haml
app/views/hooks/show.html.haml
+2
-1
config/routes.rb
config/routes.rb
+5
-1
No files found.
.foreman
0 → 100644
View file @
57ac5fe9
port: 9999
Procfile
0 → 100644
View file @
57ac5fe9
web: bundle exec rails s -p $PORT
worker: bundle exec rake environment resque:work QUEUE=*
app/controllers/hooks_controller.rb
View file @
57ac5fe9
...
...
@@ -29,6 +29,15 @@ class HooksController < ApplicationController
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
@hook
=
@project
.
web_hooks
.
find
(
params
[
:id
])
end
...
...
app/views/hooks/show.html.haml
View file @
57ac5fe9
=
render
"repositories/head"
=
debug
@hook
%h3
=
@hook
.
url
-
if
can?
current_user
,
:admin_project
,
@project
.merge-tabs
=
link_to
'Test Hook'
,
test_project_hook_path
(
@project
,
@hook
),
:class
=>
"grey-button"
.right
=
link_to
'Remove'
,
project_hook_path
(
@project
,
@hook
),
:confirm
=>
'Are you sure?'
,
:method
=>
:delete
,
:class
=>
"red-button"
config/routes.rb
View file @
57ac5fe9
...
...
@@ -85,7 +85,11 @@ Gitlab::Application.routes.draw do
end
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
:team_members
resources
:issues
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment