feat: save commit message and better view on deployments
This commit is contained in:
@@ -9,7 +9,8 @@ class ApplicationDeploymentQueue extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
public function setStatus(string $status) {
|
||||
public function setStatus(string $status)
|
||||
{
|
||||
$this->update([
|
||||
'status' => $status,
|
||||
]);
|
||||
@@ -21,7 +22,13 @@ class ApplicationDeploymentQueue extends Model
|
||||
}
|
||||
return collect(json_decode($this->logs))->where('name', $name)->first()?->output ?? null;
|
||||
}
|
||||
|
||||
public function commitMessage()
|
||||
{
|
||||
if (empty($this->commit_message) || is_null($this->commit_message)) {
|
||||
return null;
|
||||
}
|
||||
return str($this->commit_message)->trim()->limit(300)->value();
|
||||
}
|
||||
public function addLogEntry(string $message, string $type = 'stdout', bool $hidden = false)
|
||||
{
|
||||
if ($type === 'error') {
|
||||
|
||||
Reference in New Issue
Block a user