21 lines
595 B
PHP
21 lines
595 B
PHP
<?php
|
|
// azure/config.php
|
|
|
|
function getAzureDevOpsConfig() {
|
|
$organization = getenv('AZURE_DEVOPS_ORGANIZATION');
|
|
$pat = getenv('AZURE_DEVOPS_PAT');
|
|
|
|
if (!$organization || !$pat) {
|
|
// Handle missing configuration
|
|
http_response_code(500);
|
|
echo json_encode(['error' => 'Azure DevOps configuration is missing. Please set AZURE_DEVOPS_ORGANIZATION and AZURE_DEVOPS_PAT environment variables.']);
|
|
exit;
|
|
}
|
|
|
|
return [
|
|
'organization' => $organization,
|
|
'pat' => $pat,
|
|
'apiUrl' => "https://dev.azure.com/{$organization}"
|
|
];
|
|
}
|