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 @@ public function run(): void '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, + ]); + } } }