summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-05-11 16:34:00 +0000
committerRobert Speicher <robert@gitlab.com>2016-05-11 16:34:00 +0000
commitd8415389de859a0dab6e9efa7d8651577631aa7e (patch)
treedd3952c1d45ae738f673b705d672ff21199496ca /doc
parent51a8619a71cd8416db5a66cfbe2a5aa118bbef36 (diff)
parentebf80db3abcaf4a0e08273bf180aa33368610b8a (diff)
downloadgitlab-ce-d8415389de859a0dab6e9efa7d8651577631aa7e.tar.gz
Merge branch 'hook-docs-behavior' into 'master'
Improve documentation and web test for web hooks Tips and documentation of actual hook behavior. Improved user feedback when testing hooks via the web UI. See merge request !4015
Diffstat (limited to 'doc')
-rw-r--r--doc/web_hooks/web_hooks.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md
index c1c51302e79..45506ac1d7c 100644
--- a/doc/web_hooks/web_hooks.md
+++ b/doc/web_hooks/web_hooks.md
@@ -13,6 +13,19 @@ You can configure webhooks to listen for specific events like pushes, issues or
Webhooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
+## Webhook endpoint tips
+
+If you are writing your own endpoint (web server) that will receive
+GitLab webhooks keep in mind the following things:
+
+- Your endpoint should send its HTTP response as fast as possible. If
+ you wait too long, GitLab may decide the hook failed and retry it.
+- Your endpoint should ALWAYS return a valid HTTP response. If you do
+ not do this then GitLab will think the hook failed and retry it.
+ Most HTTP libraries take care of this for you automatically but if
+ you are writing a low-level hook this is important to remember.
+- GitLab ignores the HTTP status code returned by your endpoint.
+
## SSL Verification
By default, the SSL certificate of the webhook endpoint is verified based on