fix(ApplicationDeploymentJob): ensure source is an object before checking GitHub app properties
This commit is contained in:
@@ -1377,7 +1377,7 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
|
||||
private function check_git_if_build_needed()
|
||||
{
|
||||
if ($this->source->getMorphClass() === \App\Models\GithubApp::class && $this->source->is_public === false) {
|
||||
if (is_object($this->source) && $this->source->getMorphClass() === \App\Models\GithubApp::class && $this->source->is_public === false) {
|
||||
$repository = githubApi($this->source, "repos/{$this->customRepository}");
|
||||
$data = data_get($repository, 'data');
|
||||
if (isset($data->id)) {
|
||||
|
||||
Reference in New Issue
Block a user