summaryrefslogtreecommitdiff
path: root/lib/api/system_hooks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/system_hooks.rb')
-rw-r--r--lib/api/system_hooks.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/system_hooks.rb b/lib/api/system_hooks.rb
index 794e34874f4..ca95c044ecc 100644
--- a/lib/api/system_hooks.rb
+++ b/lib/api/system_hooks.rb
@@ -19,10 +19,14 @@ module API
success Entities::Hook
end
params do
- requires :url, type: String, desc: 'The URL for the system hook'
+ requires :url, type: String, desc: "The URL to send the request to"
+ optional :token, type: String, desc: 'The token used to validate payloads'
+ optional :push_events, type: Boolean, desc: "Trigger hook on push events"
+ optional :tag_push_events, type: Boolean, desc: "Trigger hook on tag push events"
+ optional :enable_ssl_verification, type: Boolean, desc: "Do SSL verification when triggering the hook"
end
post do
- hook = SystemHook.new declared(params).to_h
+ hook = SystemHook.new declared(params, include_missing: false).to_h
if hook.save
present hook, with: Entities::Hook