2015-04-30 13:06:18 -04:00
|
|
|
- page_title "System Hooks"
|
2013-10-08 05:06:46 -04:00
|
|
|
%h3.page-title
|
2013-12-13 06:12:54 -05:00
|
|
|
System hooks
|
2013-10-08 05:06:46 -04:00
|
|
|
|
|
|
|
%p.light
|
2016-05-16 18:06:26 -04:00
|
|
|
#{link_to "System hooks ", help_page_path("system_hooks/system_hooks"), class: "vlink"} can be
|
2013-10-08 05:06:46 -04:00
|
|
|
used for binding events when GitLab creates a User or Project.
|
|
|
|
|
|
|
|
%hr
|
|
|
|
|
2012-07-12 15:10:34 -04:00
|
|
|
|
2014-01-04 12:32:06 -05:00
|
|
|
= form_for @hook, as: :hook, url: admin_hooks_path, html: { class: 'form-horizontal' } do |f|
|
2016-04-04 21:25:38 -04:00
|
|
|
= form_errors(@hook)
|
|
|
|
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2016-04-30 04:34:31 -04:00
|
|
|
= f.label :url, 'URL', class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2016-04-30 04:34:31 -04:00
|
|
|
= f.text_field :url, class: 'form-control'
|
|
|
|
.form-group
|
|
|
|
= f.label :token, 'Secret Token', class: 'control-label'
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :token, class: 'form-control'
|
|
|
|
%p.help-block
|
|
|
|
Use this token to validate received payloads
|
2016-04-19 05:08:02 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :url, "Trigger", class: 'control-label'
|
|
|
|
.col-sm-10.prepend-top-10
|
|
|
|
%div
|
|
|
|
System hook will be triggered on set of events like creating project
|
|
|
|
or adding ssh key. But you can also enable extra triggers like Push events.
|
|
|
|
|
2016-12-23 04:37:12 -05:00
|
|
|
.prepend-top-default
|
2016-04-19 05:08:02 -04:00
|
|
|
= 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 by a push to the repository
|
|
|
|
%div
|
|
|
|
= f.check_box :tag_push_events, class: 'pull-left'
|
|
|
|
.prepend-left-20
|
|
|
|
= f.label :tag_push_events, class: 'list-label' do
|
|
|
|
%strong Tag push events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered when a new tag is pushed to the repository
|
2015-08-11 02:59:40 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :enable_ssl_verification, "SSL verification", class: 'control-label checkbox'
|
|
|
|
.col-sm-10
|
|
|
|
.checkbox
|
|
|
|
= f.label :enable_ssl_verification do
|
|
|
|
= f.check_box :enable_ssl_verification
|
|
|
|
%strong Enable SSL verification
|
2014-01-04 12:32:06 -05:00
|
|
|
.form-actions
|
2017-04-04 18:36:19 -04:00
|
|
|
= f.submit "Add system hook", class: "btn btn-create"
|
2012-07-12 15:10:34 -04:00
|
|
|
%hr
|
|
|
|
|
2016-12-23 05:27:41 -05:00
|
|
|
- if @hooks.any?
|
2014-05-29 11:42:44 -04:00
|
|
|
.panel.panel-default
|
2014-05-29 11:43:21 -04:00
|
|
|
.panel-heading
|
2013-12-13 06:12:54 -05:00
|
|
|
System hooks (#{@hooks.count})
|
2016-04-19 05:08:02 -04:00
|
|
|
%ul.content-list
|
2013-12-13 06:12:54 -05:00
|
|
|
- @hooks.each do |hook|
|
|
|
|
%li
|
2016-04-19 05:08:02 -04:00
|
|
|
.controls
|
2017-04-04 18:36:19 -04:00
|
|
|
= link_to 'Test hook', admin_hook_test_path(hook), class: "btn btn-sm"
|
2015-03-14 03:29:32 -04:00
|
|
|
= link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm"
|
2016-04-19 05:08:02 -04:00
|
|
|
.monospace= hook.url
|
|
|
|
%div
|
|
|
|
- %w(push_events tag_push_events issues_events note_events merge_requests_events build_events).each do |trigger|
|
|
|
|
- if hook.send(trigger)
|
|
|
|
%span.label.label-gray= trigger.titleize
|
|
|
|
%span.label.label-gray SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
|