From a11dc20d71f38b09ec2572bf60bb7a97dd90aa54 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 2 May 2023 14:12:15 +0200 Subject: [PATCH] prod seeder --- database/seeders/ProductionSeeder.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index 8334cd5a4..af1daa0b8 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -2,6 +2,8 @@ namespace Database\Seeders; +use App\Models\GithubApp; +use App\Models\GitlabApp; use App\Models\InstanceSettings; use App\Models\PrivateKey; use App\Models\Project; @@ -65,5 +67,25 @@ class ProductionSeeder extends Seeder 'private_key_id' => 0, ]); } + if (GithubApp::find(0) == null) { + GithubApp::create([ + 'id' => 0, + 'name' => 'Public GitHub', + 'api_url' => 'https://api.github.com', + 'html_url' => 'https://github.com', + 'is_public' => true, + 'team_id' => 0, + ]); + } + if (GitlabApp::find(0) == null) { + GitlabApp::create([ + 'id' => 0, + 'name' => 'Public GitLab', + 'api_url' => 'https://gitlab.com/api/v4', + 'html_url' => 'https://gitlab.com', + 'is_public' => true, + 'team_id' => 0, + ]); + } } }