Added UI to define secret_token for webhook and systemhook
Codestyle changes to easy EE merge
This commit is contained in:
parent
0cd5edf35c
commit
00ced598ea
|
@ -39,6 +39,12 @@ class Admin::HooksController < Admin::ApplicationController
|
|||
end
|
||||
|
||||
def hook_params
|
||||
params.require(:hook).permit(:url, :enable_ssl_verification, :push_events, :tag_push_events)
|
||||
params.require(:hook).permit(
|
||||
:enable_ssl_verification,
|
||||
:push_events,
|
||||
:tag_push_events,
|
||||
:token,
|
||||
:url
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,8 +52,16 @@ class Projects::HooksController < Projects::ApplicationController
|
|||
end
|
||||
|
||||
def hook_params
|
||||
params.require(:hook).permit(:url, :push_events, :issues_events,
|
||||
:merge_requests_events, :tag_push_events, :note_events,
|
||||
:build_events, :enable_ssl_verification)
|
||||
params.require(:hook).permit(
|
||||
:build_events,
|
||||
:enable_ssl_verification,
|
||||
:issues_events,
|
||||
:merge_requests_events,
|
||||
:note_events,
|
||||
:push_events,
|
||||
:tag_push_events,
|
||||
:token,
|
||||
:url
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,9 +13,15 @@
|
|||
= form_errors(@hook)
|
||||
|
||||
.form-group
|
||||
= f.label :url, "URL:", class: 'control-label'
|
||||
= f.label :url, 'URL', class: 'control-label'
|
||||
.col-sm-10
|
||||
= f.text_field :url, class: "form-control"
|
||||
= 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
|
||||
.form-group
|
||||
= f.label :url, "Trigger", class: 'control-label'
|
||||
.col-sm-10.prepend-top-10
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
.form-group
|
||||
= f.label :url, "URL", class: "label-light"
|
||||
= f.text_field :url, class: "form-control", placeholder: "http://example.com/trigger-ci.json"
|
||||
.form-group
|
||||
= f.label :token, "Secret Token", class: 'label-light'
|
||||
= f.text_field :token, class: "form-control", placeholder: ''
|
||||
%p.help-block
|
||||
Use this token to validate received payloads
|
||||
.form-group
|
||||
= f.label :url, "Trigger", class: "label-light"
|
||||
%div
|
||||
|
|
Loading…
Reference in New Issue