bring webhook rake task feature parity. Not currently able to set secret_token or triggers
Description
The current rake task for adding webhooks is limited to the URL and push events. For example, this is the most that I can do currently:
sudo gitlab-rake gitlab:web_hook:add URL="https://myserver.com/commits"
Proposal
Allow the rake task to accept more environment variables that will bring parity to the webhook web form route
sudo gitlab-rake gitlab:web_hook:add URL="https://myserver.com/commits" SECRET_TOKEN=123abc EVENTS=push,merge,build
This will allow me to add webhooks across my domain to another service that I control that only accepts these pushes whitelisted with the X-Gitlab-Token
header as described in the webhook documentation. This also allows my service to accept more events than just pushes
Links / references
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/web_hook.rake