summaryrefslogtreecommitdiff
path: root/doc/hooks/custom_hooks.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/hooks/custom_hooks.md')
-rw-r--r--doc/hooks/custom_hooks.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/hooks/custom_hooks.md b/doc/hooks/custom_hooks.md
index 820934f97f1..a3b7094da58 100644
--- a/doc/hooks/custom_hooks.md
+++ b/doc/hooks/custom_hooks.md
@@ -39,3 +39,16 @@ type. For example, if the script is in Ruby the shebang will probably be
That's it! Assuming the hook code is properly implemented the hook will fire
as appropriate.
+
+## Custom error messages
+
+>**Note:**
+This feature was [introduced][5073] in GitLab 8.10.
+
+If the commit is declined or an error occurs during the Git hook check,
+the STDERR and/or SDOUT message of the hook will be present in GitLab's UI.
+
+![Custom message from custom Git hook](img/custom_hooks_error_msg.png)
+
+[hooks]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#Server-Side-Hooks
+[5073]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5073