Skip to content

Commit

Permalink
Fix nil ref error
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylomiro committed Mar 5, 2024
1 parent 6fd1b51 commit b9392e2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/actionsmetrics/event_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,11 +274,8 @@ func (reader *EventReader) fetchAndParseWorkflowJobLogs(ctx context.Context, e *
}

if strings.HasPrefix(line, "Job is about to start running on the runner:") || strings.HasPrefix(line, "Current runner version:") {
if startedTime != nil {
st, err := time.Parse(time.RFC3339, timestamp)
if err != nil {
return
}
if startedTime == nil {
st, _ := time.Parse(time.RFC3339, timestamp)
startedTime = &st
continue
}
Expand Down

0 comments on commit b9392e2

Please sign in to comment.