Add Admin UI to enable Wiki Page events webhook in projects

This commit is contained in:
Gabriel Mazetto 2016-05-13 00:25:33 -03:00
parent de20bd5b31
commit e3311178a3
3 changed files with 10 additions and 2 deletions

View File

@ -63,7 +63,8 @@ class Projects::HooksController < Projects::ApplicationController
:push_events,
:tag_push_events,
:token,
:url
:url,
:wiki_page_events
)
end
end

View File

@ -3,7 +3,7 @@
.col-md-8.col-lg-7
%strong.light-header= hook.url
%div
- %w(push_events tag_push_events issues_events note_events merge_requests_events build_events).each do |trigger|
- %w(push_events tag_push_events issues_events note_events merge_requests_events build_events wiki_page_events).each do |trigger|
- if hook.send(trigger)
%span.label.label-gray.deploy-project-label= trigger.titleize
.col-md-4.col-lg-5.text-right-lg.prepend-top-5

View File

@ -64,6 +64,13 @@
Build events
%p.light
This url will be triggered when the build status changes
%div
= f.check_box :wiki_page_events, class: 'pull-left'
.prepend-left-20
= f.label :wiki_page_events, class: 'label-light append-bottom-0' do
%strong Wiki Page events
%p.light
This url will be triggered when a wiki page is created/updated
.form-group
= f.label :enable_ssl_verification, "SSL verification", class: "label-light"
%div