fix: public prs should not be commented
This commit is contained in:
@@ -30,6 +30,9 @@ class ApplicationPullRequestUpdateJob implements ShouldQueue, ShouldBeEncrypted
|
|||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
if ($this->application->is_public_repository()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ($this->status === ProcessStatus::CLOSED) {
|
if ($this->status === ProcessStatus::CLOSED) {
|
||||||
$this->delete_comment();
|
$this->delete_comment();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -65,6 +65,12 @@ class Application extends BaseModel
|
|||||||
return $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')
|
return $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')
|
||||||
->withPivot('server_id', 'status');
|
->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
|
public function is_github_based(): bool
|
||||||
{
|
{
|
||||||
if (data_get($this, 'source')) {
|
if (data_get($this, 'source')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user