I am currently updating our custom, in-house plugin to check commit messages for issue IDs of a legacy system to the new Repository Hook API.
Especially the possibility to also reject commits from the File Edit Mode in the Browser is an awesome feature to have.
But: It seems that the reasons for rejecting a commit are not displayed in the GUI. When doing a commit/push from git, I can clearly see the error message in the log of git, but when doing it in the browser, I only get a message about how I don’t have permission to edit the branch. My actual reason for rejecting the commit is nowhere to be seen.
I followed this guide, creating a callback with the “added_to_repository” filter and the new RepositoryHookResult etc.
But still, I only get a useless, default error message What am I doing wrong?