Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Fix triggered jobs duration #730

Merged
merged 1 commit into from
May 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion commands/ci/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ func NewCmdStatus(f *cmdutils.Factory) *cobra.Command {
if job.FinishedAt != nil {
end = *job.FinishedAt
}
duration := utils.FmtDuration(end.Sub(*job.StartedAt))
var duration string
if job.StartedAt != nil {
duration = utils.FmtDuration(end.Sub(*job.StartedAt))
} else {
duration = "not started"
}
var status string
switch s := job.Status; s {
case "failed":
Expand Down