diff --git a/resources/views/events/github/workflow_job/completed.blade.php b/resources/views/events/github/workflow_job/completed.blade.php index 412719b..a663b3a 100644 --- a/resources/views/events/github/workflow_job/completed.blade.php +++ b/resources/views/events/github/workflow_job/completed.blade.php @@ -12,10 +12,15 @@ $icon = '🚫'; $last = '❌'; } + +$startedAt = new DateTime($payload->workflow_job->started_at); +$completedAt = new DateTime($payload->workflow_job->completed_at); +$interval = $completedAt->diff($startedAt); +$allSeconds = $interval->s + $interval->i * 60 + $interval->h * 3600; ?> {{ $icon }} {!! __("tg-notifier::events/github/workflow_job.completed.$status", ['repo' => "🦑{$payload->repository->full_name}"]) !!} 🚀 {!! __('tg-notifier::events/github/workflow_job.name') !!}: {{ $icon }} {{ $payload->workflow_job->name }} {{ $last }} -🚨 {!! __('tg-notifier::events/github/workflow_job.status.title') !!}: {!! __('tg-notifier::events/github/workflow_job.status.'.$status) !!} +🚨 {!! __('tg-notifier::events/github/workflow_job.status.title') !!}: {!! __('tg-notifier::events/github/workflow_job.status.'.$status) !!} 🕓 {{ $allSeconds }}s 🔗 {!! __('tg-notifier::events/github/workflow_job.link', ['link' => "{$payload->workflow_job->workflow_name}"]) !!}