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: public prs should not be commented

Andras Bacsaia352e4cbf716
diff --git a/app/Jobs/ApplicationPullRequestUpdateJob.php b/app/Jobs/ApplicationPullRequestUpdateJob.php
index 85dde009d5..74f7a7b674 100755
--- a/app/Jobs/ApplicationPullRequestUpdateJob.php
+++ b/app/Jobs/ApplicationPullRequestUpdateJob.php
@@ -30,6 +30,9 @@ class ApplicationPullRequestUpdateJob implements ShouldQueue, ShouldBeEncrypted
public function handle()
{
try {
+ if ($this->application->is_public_repository()) {
+ return;
+ }
if ($this->status === ProcessStatus::CLOSED) {
$this->delete_comment();
return;
diff --git a/app/Models/Application.php b/app/Models/Application.php
index 7ebabf1b4e..4c9f3e1af2 100644
--- a/app/Models/Application.php
+++ b/app/Models/Application.php
@@ -65,6 +65,12 @@ class Application extends BaseModel
return $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')
->withPivot('server_id', 'status');
}
+ public function is_public_repository(): bool {
+ if (data_get($this, 'source.is_public')) {
+ return true;
+ }
+ return false;
+ }
public function is_github_based(): bool
{
if (data_get($this, 'source')) {