2015-09-11 14:41:01 +05:30
|
|
|
- page_title "Web Hooks"
|
2014-09-02 18:07:02 +05:30
|
|
|
%h3.page-title
|
|
|
|
Web hooks
|
|
|
|
|
|
|
|
%p.light
|
|
|
|
#{link_to "Web hooks ", help_page_path("web_hooks", "web_hooks"), class: "vlink"} can be
|
|
|
|
used for binding events when something is happening within the project.
|
|
|
|
|
|
|
|
%hr.clearfix
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: namespace_project_hooks_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f|
|
2014-09-02 18:07:02 +05:30
|
|
|
-if @hook.errors.any?
|
|
|
|
.alert.alert-danger
|
|
|
|
- @hook.errors.full_messages.each do |msg|
|
|
|
|
%p= msg
|
|
|
|
.form-group
|
|
|
|
= f.label :url, "URL", class: 'control-label'
|
|
|
|
.col-sm-10
|
|
|
|
= f.text_field :url, class: "form-control", placeholder: 'http://example.com/trigger-ci.json'
|
|
|
|
.form-group
|
|
|
|
= f.label :url, "Trigger", class: 'control-label'
|
2015-11-26 14:37:03 +05:30
|
|
|
.col-sm-10.prepend-top-10
|
2014-09-02 18:07:02 +05:30
|
|
|
%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 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-09-11 14:41:01 +05:30
|
|
|
%div
|
|
|
|
= f.check_box :note_events, class: 'pull-left'
|
|
|
|
.prepend-left-20
|
|
|
|
= f.label :note_events, class: 'list-label' do
|
|
|
|
%strong Comments
|
|
|
|
%p.light
|
|
|
|
This url will be triggered when someone adds a comment
|
2014-09-02 18:07:02 +05:30
|
|
|
%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 when an issue is created
|
|
|
|
%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 when a merge request is created
|
2015-09-25 12:07:36 +05:30
|
|
|
.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-09-02 18:07:02 +05:30
|
|
|
.form-actions
|
|
|
|
= f.submit "Add Web Hook", class: "btn btn-create"
|
|
|
|
|
|
|
|
-if @hooks.any?
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
Web hooks (#{@hooks.count})
|
|
|
|
%ul.well-list
|
|
|
|
- @hooks.each do |hook|
|
|
|
|
%li
|
|
|
|
.pull-right
|
2015-04-26 12:48:37 +05:30
|
|
|
= link_to 'Test Hook', test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm btn-grouped"
|
|
|
|
= link_to 'Remove', namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
|
2014-09-02 18:07:02 +05:30
|
|
|
.clearfix
|
|
|
|
%span.monospace= hook.url
|
|
|
|
%p
|
2015-09-11 14:41:01 +05:30
|
|
|
- %w(push_events tag_push_events issues_events note_events merge_requests_events).each do |trigger|
|
2014-09-02 18:07:02 +05:30
|
|
|
- if hook.send(trigger)
|
|
|
|
%span.label.label-gray= trigger.titleize
|
2015-09-25 12:07:36 +05:30
|
|
|
SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
|