Custom hook errors don't display in merge request widget
Per https://docs.gitlab.com/ee/administration/custom_hooks.html#custom-error-messages, we should show error messages from custom hooks in the merge request widget. When I tested this, the widget simply spins on 'Merge in progress' forever.
Of note, a custom hook error is displayed if you attempt to commit in the web UI and something goes wrong. Somewhere along the way, we accidentally broke this functionality in the MR widget, though.
Steps to reproduce:
- Create a project and make sure there is at least a master branch with some files.
- Add a custom hook on the filesystem. It's contents can be simple. See https://docs.gitlab.com/ee/administration/custom_hooks.html#setup for details about location and permissions. When I tested it, I put:
>&2 echo "error" exit 1
- Attempt to create a new branch in the UI. The branch creation should fail with 'error'. This validates that your hook works.
- Temporarily move the hook.
- Create the branch since it won't fail this time.
- Add a file or two to the new branch.
- Create a merge request
- Attempt to merge.
- Observe that the error is not shown, but 'Merge in progress' spins forever. There may be an error in the Sidekiq log.
For reference, Zendesk issue https://gitlab.zendesk.com/agent/tickets/66129