Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: bitbucket commits link

Andras Bacsaib47925a31971
diff --git a/app/Models/Application.php b/app/Models/Application.php
index 0f3425dd60..e6fd3e33da 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -10,6 +10,7 @@ use Illuminate\Support\Collection;
use Spatie\Activitylog\Models\Activity;
use Illuminate\Support\Str;
use RuntimeException;
+use Spatie\Url\Url;
use Symfony\Component\Yaml\Yaml;
use Visus\Cuid2\Cuid2;
@@ -213,6 +214,13 @@ class Application extends BaseModel
$git_repository = str_replace(['git@', ':', '.git'], ['', '/', ''], $this->git_repository);
return "https://{$git_repository}/commit/{$link}";
}
+ if (str($this->git_repository)->contains('bitbucket')) {
+ $git_repository = str_replace('.git', '', $this->git_repository);
+ $url = Url::fromString($git_repository);
+ $url = $url->withUserInfo('');
+ $url = $url->withPath($url->getPath() . '/commits/' . $link);
+ return $url->__toString();
+ }
return $this->git_repository;
}
public function dockerfileLocation(): Attribute