Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-10-18 21:10:08 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-10-31 15:42:29 +0300
commita4827ee2b9a5dd51356a4e11455c0075fe6cea69 (patch)
tree178aa0e6c5bf0c322690c8d9f5d5f335e195e2f0 /lib/api
parent76690017e28c2e42e58130fe64d7feb92d085b01 (diff)
Be able to POST subscriptions for system hooks
Diffstat (limited to 'lib/api')
-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