From d250e8690deb6a52d5820bf86e9ff9453fc95ccd Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 5 Jul 2016 14:38:46 +0300 Subject: [PATCH] Add documentation for custom Git hook error message in GitLab's UI --- doc/hooks/custom_hooks.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/hooks/custom_hooks.md b/doc/hooks/custom_hooks.md index 820934f97f..a3b7094da5 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