fix: only strip git_host from repository_url when git_host is github.com

This commit is contained in:
seahurt 2026-05-19 14:10:17 +08:00 committed by GitHub
parent 49656aa1ed
commit d3b76dfa93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1140,8 +1140,8 @@ private function create_application(Request $request, $type)
if ($git_host === 'github.com') { if ($git_host === 'github.com') {
$application->source_type = GithubApp::class; $application->source_type = GithubApp::class;
$application->source_id = GithubApp::find(0)->id; $application->source_id = GithubApp::find(0)->id;
$application->git_repository = str($repository_url_parsed->getSegment(1).'/'.$repository_url_parsed->getSegment(2))->trim()->toString();
} }
$application->git_repository = str($repository_url_parsed->getSegment(1).'/'.$repository_url_parsed->getSegment(2))->trim()->toString();
$application->fqdn = $fqdn; $application->fqdn = $fqdn;
$application->destination_id = $destination->id; $application->destination_id = $destination->id;
$application->destination_type = $destination->getMorphClass(); $application->destination_type = $destination->getMorphClass();