Still Testing

This commit is contained in:
2024-11-08 17:59:42 -07:00
parent 68c2a34096
commit dc9327274b
11 changed files with 439 additions and 20 deletions

View File

@ -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");