fixed missing features
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Actions\Git\Data\GitRepository;
|
||||
use App\Actions\Git\GitProviderKey;
|
||||
use Database\Factories\RepositoryConnectionFactory;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
@@ -38,4 +39,18 @@ class RepositoryConnection extends Model
|
||||
{
|
||||
return $this->belongsTo(Project::class);
|
||||
}
|
||||
|
||||
public function toGitRepository(): GitRepository
|
||||
{
|
||||
return new GitRepository(
|
||||
baseUrl: $this->base_url,
|
||||
providerRepositoryId: $this->provider_repository_id,
|
||||
owner: $this->owner_name,
|
||||
name: $this->repository_name,
|
||||
fullName: $this->repository_full_name,
|
||||
htmlUrl: $this->repository_url,
|
||||
defaultBranch: null,
|
||||
isPrivate: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user