neiam
/gitgud
Git Gud
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
1
Log in to mark this repository.
Start a run's clock once too
5c5c51d · Gabriel Morell · 2026-09-19 03:40
Message
{commit_body(@commit)}
Files changed
modified
lib/git_gud/workflows/workflow_run.ex
+8
−1
@@ -52,9 +52,16 @@ defmodule GitGud.Workflows.WorkflowRun do
| 52 | 52 | |
| 53 | 53 | fields = |
| 54 | 54 | cond do |
| 55 | − status == "running" -> | |
| 55 | + # First `running` only, as for a job: a run is marked running | |
| 56 | + # again each time one of its jobs starts, and taking `now` every | |
| 57 | + # time walked the clock forward until an eleven-minute run | |
| 58 | + # displayed as forty-three seconds. | |
| 59 | + status == "running" and is_nil(run.started_at) -> | |
| 56 | 60 | Map.put(fields, :started_at, now) |
| 57 | 61 | |
| 62 | + status == "running" -> | |
| 63 | + fields | |
| 64 | + | |
| 58 | 65 | status in ~w(success failure cancelled) -> |
| 59 | 66 | fields |
| 60 | 67 | |> Map.put(:completed_at, now) |
Parents: 7f577c4