Still Testing
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#if WorkItems
|
||||
using File_Folder_Helper.Day.Q32024.ConvertExcelToJson;
|
||||
using File_Folder_Helper.Day.Q32024.WorkItems;
|
||||
using File_Folder_Helper.ADO2024.PI3.WorkItems;
|
||||
using File_Folder_Helper.Models;
|
||||
#endif
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
@ -78,7 +78,7 @@ internal static partial class Helper20240911
|
||||
|
||||
[JsonSourceGenerationOptions(WriteIndented = true)]
|
||||
[JsonSerializable(typeof(WorkItem[]))]
|
||||
private partial class WorkItemSourceGenerationContext : JsonSerializerContext
|
||||
private partial class WorkItemCollectionSourceGenerationContext : JsonSerializerContext
|
||||
{
|
||||
}
|
||||
|
||||
@ -355,7 +355,7 @@ internal static partial class Helper20240911
|
||||
if (productionJSON.Result != developmentJSON.Result)
|
||||
logger.LogWarning("productionJSON doesn't match developmentJSON");
|
||||
}
|
||||
WorkItem[]? workItems = JsonSerializer.Deserialize(developmentJSON.Result, WorkItemSourceGenerationContext.Default.WorkItemArray);
|
||||
WorkItem[]? workItems = JsonSerializer.Deserialize(developmentJSON.Result, WorkItemCollectionSourceGenerationContext.Default.WorkItemArray);
|
||||
if (workItems is null)
|
||||
logger.LogWarning("workItems is null");
|
||||
else
|
||||
@ -400,7 +400,7 @@ internal static partial class Helper20240911
|
||||
string htmlOld = !File.Exists(htmlFile) ? string.Empty : File.ReadAllText(htmlFile);
|
||||
if (html != htmlOld)
|
||||
File.WriteAllText(htmlFile, html);
|
||||
string json = JsonSerializer.Serialize(workItems.ToArray(), WorkItemSourceGenerationContext.Default.WorkItemArray);
|
||||
string json = JsonSerializer.Serialize(workItems.ToArray(), WorkItemCollectionSourceGenerationContext.Default.WorkItemArray);
|
||||
string jsonFile = Path.Combine(destinationDirectory, $"{fileName}.json");
|
||||
string jsonOld = !File.Exists(jsonFile) ? string.Empty : File.ReadAllText(jsonFile);
|
||||
if (json != jsonOld)
|
||||
@ -704,7 +704,6 @@ internal static partial class Helper20240911
|
||||
ReadOnlyDictionary<int, Record> keyValuePairs = GetWorkItems(logger, args[2], args[3]);
|
||||
WriteFileStructure(destinationDirectory, keyValuePairs);
|
||||
ReadOnlyCollection<Record> records = new(keyValuePairs.Values.ToArray());
|
||||
logger.LogInformation("Found {workItems} workItemAndChildren", records.Count);
|
||||
ReadOnlyCollection<string> bugUserStoryWorkItemTypes = new(new string[] { "Bug", "User Story" });
|
||||
ReadOnlyCollection<string> bugUserStoryTaskWorkItemTypes = new(new string[] { "Bug", "User Story", "Task" });
|
||||
WriteFiles(destinationDirectory, records, "with-parents");
|
||||
|
@ -420,8 +420,12 @@ internal static partial class Helper20241030
|
||||
|
||||
internal static void GetComplete(ILogger<Worker> logger, List<string> args)
|
||||
{
|
||||
logger.LogError("GetComplete is not available in CDE {args[0]}", args[0]);
|
||||
logger.LogError("GetComplete is not available in CDE {args[1]}", args[1]);
|
||||
string searchPattern = args[2];
|
||||
string sourceDirectory = Path.GetFullPath(args[0]);
|
||||
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (files.Length != 1)
|
||||
logger.LogError("No files found in {sourceDirectory} with search pattern {searchPattern}", sourceDirectory, searchPattern);
|
||||
logger.LogError("GetComplete is not available in HgCV {args[1]}", args[1]);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -546,7 +546,11 @@ internal static partial class Helper20241031
|
||||
|
||||
internal static void GetComplete(ILogger<Worker> logger, List<string> args)
|
||||
{
|
||||
logger.LogError("GetComplete is not available in CDE {args[0]}", args[0]);
|
||||
string searchPattern = args[2];
|
||||
string sourceDirectory = Path.GetFullPath(args[0]);
|
||||
string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.TopDirectoryOnly);
|
||||
if (files.Length != 1)
|
||||
logger.LogError("No files found in {sourceDirectory} with search pattern {searchPattern}", sourceDirectory, searchPattern);
|
||||
logger.LogError("GetComplete is not available in CDE {args[1]}", args[1]);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user