diff --git a/php/submitIssue.php b/php/submitIssue.php index 402f0ce..e1cae27 100644 --- a/php/submitIssue.php +++ b/php/submitIssue.php @@ -1,3 +1,34 @@ -THIS FILE WILL CONTAIN THE FUNCTIONS NEEDED TO SUBMIT AN ISSUE TO gitea + $body, + 'title' => $subject + ); + + $preparedData = json_encode($rawData); + + // Prepare CURL + $curlConnection = curl_init('https://git.fjla.uk/api/v1/repos/fred.boniface/athena.fb-infra.uk/issues'); + curl_setopt($curlConnection, CURLOPT_POSTFIELDS, $preparedData); + curl_setopt($curlConnection, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curlConnection, CURLOPT_HTTPHEADER, $httpHeaders); + + // Get response and exit CURL + $response = curl_exec($curlConnection); + curl_close($curlConnection); + + return $response; +}