feat: init version of any git deployment

This commit is contained in:
Andras Bacsai
2023-10-06 13:46:42 +02:00
parent 3adeb2f73f
commit 5b56c50f03
9 changed files with 94 additions and 50 deletions

View File

@@ -68,6 +68,7 @@ class Application extends BaseModel
if (!is_null($this->source?->html_url) && !is_null($this->git_repository) && !is_null($this->git_branch)) {
return "{$this->source->html_url}/{$this->git_repository}/tree/{$this->git_branch}";
}
return $this->git_repository;
}
);
@@ -80,6 +81,7 @@ class Application extends BaseModel
if (!is_null($this->source?->html_url) && !is_null($this->git_repository) && !is_null($this->git_branch)) {
return "{$this->source->html_url}/{$this->git_repository}/commits/{$this->git_branch}";
}
return $this->git_repository;
}
);
}
@@ -224,6 +226,8 @@ class Application extends BaseModel
return 'deploy_key';
} else if (data_get($this, 'source')) {
return 'source';
} else {
return 'other';
}
throw new \Exception('No deployment type found');
}
@@ -239,6 +243,9 @@ class Application extends BaseModel
if ($this->dockerfile) {
return false;
}
if (is_null($this->source)) {
return false;
}
return true;
}
public function isHealthcheckDisabled(): bool