From 77ef3646bcf22b997bcb9d3797e9a517b4639f04 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Sat, 5 Aug 2023 17:09:42 -0700 Subject: [PATCH] Small fix-up for status tooltip --- src/Models/BaseWorkflowType.cs | 1 + src/Resources/UIStrings.Designer.cs | 4 ++-- src/Resources/UIStrings.resx | 4 ++-- src/ToolWindows/GHActionsToolWindow.xaml | 6 +++++- src/ToolWindows/GHActionsToolWindow.xaml.cs | 5 +++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Models/BaseWorkflowType.cs b/src/Models/BaseWorkflowType.cs index 1f8eea5..8e47869 100644 --- a/src/Models/BaseWorkflowType.cs +++ b/src/Models/BaseWorkflowType.cs @@ -12,6 +12,7 @@ public abstract class BaseWorkflowType public string Id { get; set; } public string TriggerEvent { get; set; } public string TriggerLogin { get; set; } + public string RunDuration { get; set; } public bool HasActions { diff --git a/src/Resources/UIStrings.Designer.cs b/src/Resources/UIStrings.Designer.cs index 33eab9c..8adb618 100644 --- a/src/Resources/UIStrings.Designer.cs +++ b/src/Resources/UIStrings.Designer.cs @@ -277,7 +277,7 @@ public static string RUN_WORKFLOW { } /// - /// Looks up a localized string similar to by . + /// Looks up a localized string similar to by. /// public static string TRIGGERED_BY { get { @@ -286,7 +286,7 @@ public static string TRIGGERED_BY { } /// - /// Looks up a localized string similar to Triggered via . + /// Looks up a localized string similar to Triggered via. /// public static string TRIGGERED_VIA { get { diff --git a/src/Resources/UIStrings.resx b/src/Resources/UIStrings.resx index 952d834..5d071a2 100644 --- a/src/Resources/UIStrings.resx +++ b/src/Resources/UIStrings.resx @@ -214,11 +214,11 @@ Menu for running a workflow - by + by Message separating event and actor - requries spaces - Triggered via + Triggered via Message starting the trigger sentence diff --git a/src/ToolWindows/GHActionsToolWindow.xaml b/src/ToolWindows/GHActionsToolWindow.xaml index 7940cc7..ba4ffde 100644 --- a/src/ToolWindows/GHActionsToolWindow.xaml +++ b/src/ToolWindows/GHActionsToolWindow.xaml @@ -64,7 +64,11 @@ - + + + + + diff --git a/src/ToolWindows/GHActionsToolWindow.xaml.cs b/src/ToolWindows/GHActionsToolWindow.xaml.cs index 688936d..100afe0 100644 --- a/src/ToolWindows/GHActionsToolWindow.xaml.cs +++ b/src/ToolWindows/GHActionsToolWindow.xaml.cs @@ -168,13 +168,14 @@ private async Task LoadDataAsync() { SimpleRun simpleRun = new() { - Conclusion = run.Conclusion is not null ? run.Conclusion.Value.StringValue : run.Status.StringValue, + Conclusion = run.Conclusion is not null ? run.Conclusion.Value.StringValue.Humanize(LetterCasing.Title) : run.Status.StringValue.Humanize(LetterCasing.Title), Name = run.Name, LogDate = run.UpdatedAt, Id = run.Id.ToString(), RunNumber = run.RunNumber.ToString(), TriggerEvent = run.Event, - TriggerLogin = run.TriggeringActor.Login + TriggerLogin = run.TriggeringActor.Login, + RunDuration = (run.UpdatedAt - run.RunStartedAt).Humanize(2) }; if (refreshPending)