2013-08-15 14:19:29 -04:00
|
|
|
%h3.page-title
|
2013-12-02 14:38:32 -05:00
|
|
|
Web hooks
|
2013-08-15 14:19:29 -04:00
|
|
|
|
|
|
|
%p.light
|
2013-12-02 14:38:32 -05:00
|
|
|
#{link_to "Web hooks ", help_web_hooks_path, class: "vlink"} can be
|
|
|
|
used for binding events when something happends to the the project.
|
2013-08-15 14:19:29 -04:00
|
|
|
|
|
|
|
%hr.clearfix
|
2012-01-08 06:20:20 -05:00
|
|
|
|
2012-08-23 17:04:43 -04:00
|
|
|
= form_for [@project, @hook], as: :hook, url: project_hooks_path(@project), html: { class: 'form-inline' } do |f|
|
2012-04-26 13:43:12 -04:00
|
|
|
-if @hook.errors.any?
|
2013-01-30 09:53:18 -05:00
|
|
|
.alert.alert-error
|
2012-04-26 13:43:12 -04:00
|
|
|
- @hook.errors.full_messages.each do |msg|
|
|
|
|
%p= msg
|
2013-08-07 16:30:40 -04:00
|
|
|
.control-group
|
2013-12-02 14:38:32 -05:00
|
|
|
= f.label :url, "URL"
|
2013-08-07 16:30:40 -04:00
|
|
|
.controls
|
2013-08-08 04:57:34 -04:00
|
|
|
= f.text_field :url, class: "text_field input-xxlarge input-xpadding", placeholder: 'http://example.com/trigger-ci.json'
|
2012-04-26 13:43:12 -04:00
|
|
|
|
2013-03-14 16:24:27 -04:00
|
|
|
= f.submit "Add Web Hook", class: "btn btn-create"
|
2013-12-02 14:38:32 -05:00
|
|
|
.control-group
|
|
|
|
= f.label :url, "Trigger"
|
|
|
|
.controls
|
|
|
|
%div
|
|
|
|
= f.check_box :push_events, class: 'pull-left'
|
|
|
|
.prepend-left-20
|
|
|
|
= f.label :push_events, class: 'list-label' do
|
|
|
|
%strong Push events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered in case of push to repository
|
|
|
|
%div
|
|
|
|
= f.check_box :issues_events, class: 'pull-left'
|
|
|
|
.prepend-left-20
|
|
|
|
= f.label :issues_events, class: 'list-label' do
|
|
|
|
%strong Issues events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered for created issues
|
|
|
|
%div
|
|
|
|
= f.check_box :merge_requests_events, class: 'pull-left'
|
|
|
|
.prepend-left-20
|
|
|
|
= f.label :merge_requests_events, class: 'list-label' do
|
|
|
|
%strong Merge Request events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered for created merge requests
|
2012-04-26 13:43:12 -04:00
|
|
|
%hr
|
2012-03-28 03:46:51 -04:00
|
|
|
|
2012-03-05 17:29:40 -05:00
|
|
|
-if @hooks.any?
|
2013-06-19 15:55:49 -04:00
|
|
|
.ui-box
|
2013-07-13 13:36:21 -04:00
|
|
|
.title
|
2013-12-13 06:14:43 -05:00
|
|
|
Web hooks (#{@hooks.count})
|
2013-06-19 15:55:49 -04:00
|
|
|
%ul.well-list
|
|
|
|
- @hooks.each do |hook|
|
|
|
|
%li
|
2013-01-30 09:40:43 -05:00
|
|
|
.pull-right
|
2013-01-29 15:29:21 -05:00
|
|
|
= link_to 'Test Hook', test_project_hook_path(@project, hook), class: "btn btn-small grouped"
|
2013-12-10 14:33:21 -05:00
|
|
|
= link_to 'Remove', project_hook_path(@project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-small grouped"
|
2013-12-02 14:38:32 -05:00
|
|
|
.clearfix
|
|
|
|
%span.monospace= hook.url
|
|
|
|
%p
|
|
|
|
- %w(push_events issues_events merge_requests_events).each do |trigger|
|
|
|
|
- if hook.send(trigger)
|
|
|
|
%span.label.label-gray= trigger.titleize
|