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
app/Http/Controllers/GiteaApiController

View file

@ -19,10 +19,10 @@ class GiteaFetch extends Controller
public function __construct()
{
$this->main_company_organization = getenv('GITEA_MAIN_COMPANY_ORGANIZATION');
$this->partner_organization = getenv('GITEA_PARTNER_ORGANIZATION');
$this->gitea_url = getenv('GITEA_URL');
$this->gitea_token = getenv('GITEA_TOKEN');
$this->main_company_organization = config('app.gitea_main_company_organization');
$this->partner_organization = config('app.gitea_partner_organization');
$this->gitea_url = config('app.gitea_url');
$this->gitea_token = config('app.gitea_token');
$this->giteaClient = new Client(null, null, $this->gitea_url);
$this->giteaClient->authenticate($this->gitea_token, null, Client::AUTH_ACCESS_TOKEN);
}