diff --git a/Builds/Model/ActionStatus.swift b/Builds/Model/ActionStatus.swift index 91aadc1..a48d446 100644 --- a/Builds/Model/ActionStatus.swift +++ b/Builds/Model/ActionStatus.swift @@ -43,6 +43,9 @@ extension ActionStatus { guard let workflowRun = workflowRun else { return .gray } + if workflowRun.status == .waiting { + return .yellow + } if workflowRun.status == .inProgress { return .orange } diff --git a/Builds/Model/ApplicationModel.swift b/Builds/Model/ApplicationModel.swift index 748f65b..7305dff 100644 --- a/Builds/Model/ApplicationModel.swift +++ b/Builds/Model/ApplicationModel.swift @@ -68,7 +68,6 @@ class ApplicationModel: ObservableObject { func update(action: Action) async throws -> ActionStatus { let workflowRuns = try await client.workflowRuns(for: action.repositoryName) // TODO: Make a faulting filter. - print(workflowRuns) let latestRun = workflowRuns.first { workflowRun in if workflowRun.workflowId != action.workflowId { @@ -102,7 +101,7 @@ class ApplicationModel: ObservableObject { self.cachedStatus[action] = status } } catch { - print("FAILED WITH ERROR") + print("Failed to update with error \(error).") } } } diff --git a/Builds/Model/GitHub.swift b/Builds/Model/GitHub.swift index 7f0b5bb..41b44e6 100644 --- a/Builds/Model/GitHub.swift +++ b/Builds/Model/GitHub.swift @@ -140,6 +140,7 @@ class GitHub { } enum Status: String, Codable { + case waiting = "waiting" case inProgress = "in_progress" case completed = "completed" }