System Hooks not firing
Created by: mrenigma
Hi All,
I have been testing out system hooks as a possible way of linking Gitlab's events to another database on the server but the system hook is not firing.
The system hook works when testing using the "test" button, as well as when I fire the PHP script on its own but does not work when for instance a project is created.
I have used http://requestb.in as well to see if it was my script but the exact same thing occurs, were it only works when clicking the test button.
I read within this forum that you need to use $HTTP_RAW_POST_DATA to receive the JSON string of data and this works well when testing but no results otherwise, the data is received using the following:
$phpInput = file_get_contents("php://input");
$postData = (!empty($phpInput)) ? $phpInput : $HTTP_RAW_POST_DATA;
Is anyone else having this issue with Gitlab 2.7 and is there a possible solution to this?
Many Thanks, MrEnigma