php-integration #21

Closed
fred.boniface wants to merge 146 commits from php-integration into main
1 changed files with 7 additions and 2 deletions
Showing only changes of commit c70c7637a3 - Show all commits

View File

@ -2,6 +2,8 @@
// Get API Key for git.fjla.uk
$giteaKey = "Authorization: token d9e748bbca7b662dbd946854e57ae0213d0e8f88";
echo "Gitea AUTH header is: $giteaKey";
// Set httpHeaders
$httpHeaders = array(
"accept: application/json",
@ -13,6 +15,8 @@
$body = "This is a PHP-CLI test issue.";
$subject = "Test Issue";
echo "Prepared POST data:\nSubject: $subject\nBody:$body";
// Prepare the request
$rawData = array(
'body' => $body,
@ -22,6 +26,8 @@
$issueData = json_encode($rawData);
echo "Ready to send data:\n$issueData"
// Prepare CURL
$curlConnection = curl_init('https://git.fjla.uk/api/v1/repos/fred.boniface/athena.fb-infra.uk/issues');
curl_setopt($curlConnection, CURLOPT_POSTFIELDS, $issueData);
@ -32,6 +38,5 @@
$giteaResponse = curl_exec($curlConnection);
curl_close($curlConnection);
echo $issueData . "\n\n";
echo $giteaResponse;
echo "Response: " . $giteaResponse;
?>