fix: env vars handled via conf file, add: functional tests

This commit is contained in:
Michael 2024-08-17 18:06:06 +02:00
parent 3d08b14f11
commit 21c4330f16
39 changed files with 416 additions and 172 deletions

View file

@ -2,6 +2,8 @@
namespace App\Console;
use App\Http\Controllers\GiteaApiController\GiteaExport;
use Dotenv\Dotenv;
use Illuminate\Console\Scheduling\Schedule;
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
@ -24,6 +26,24 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
//
$schedule->call(function () {
$firstDay = date('Y-m-01'); // First day of the current month
$lastDay = date('Y-m-t'); // Last day of the current month
$calculate_agent_cost = true;
$third_party_integrations_allow = true;
$third_party_integrations_nextcloud = true;
$third_party_integrations_open_project = false;
$email_send_allow = true;
$gitea_export = new GiteaExport(
$calculate_agent_cost,
$third_party_integrations_allow,
$third_party_integrations_nextcloud,
$third_party_integrations_open_project,
$email_send_allow,
);
$gitea_export->export_issues($firstDay, $lastDay, ['state' => 'closed']);
})->monthly();
}
}