Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions DotNet.DocsTools/GitHubObjects/StoryPointSize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ private StoryPointSize(int CalendarYear, string Month, string Size, int? Priorit
public string Size { get; }
public int? Priority { get; }

public string FullMonthText
{
get
{
if (!TryGetMonthOrdinal(Month, out int ordinal))
{
return Month;
}

return System.Globalization.CultureInfo.InvariantCulture.DateTimeFormat.GetMonthName(ordinal);
}
}

public bool IsPastIteration
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class BuildExtendedPropertiesTests
[
new () { Label = ":checkered_flag: Release: .NET 9", Tag = "new-feature" },
new () { Label = labelForTag, Tag = "content-curation" },
new () { Label = labelWithReplacement, Tag = "Highlight-$FullMonthText$" }
];

private static ParentForLabel[] _parentMap =
Expand All @@ -41,6 +42,8 @@ public class BuildExtendedPropertiesTests
private const string labelWithParent = "user-feedback";
private const string labelWithoutParent = "bug";

private const string labelWithReplacement = ":sparkler: Highlight :sparkler:";


private const string PastProject = """
{
Expand Down Expand Up @@ -256,13 +259,13 @@ public class BuildExtendedPropertiesTests
},
"labels": {
"nodes": [
{
"name": "{{labelForTag}}",
"id": "MDU6TGFiZWwzMDkwMTEzMzI1"
},
{
"name": "{{labelWithoutTag}}",
"id": "LA_kwDOFn2dfM8AAAABK0cMjA"
},
{
"name": "{{labelWithReplacement}}",
"id": "NA"
}
]
},
Expand Down Expand Up @@ -665,7 +668,7 @@ public static void BuildExtensionForFutureProjectWithTag()
Assert.Equal(2, extendedProperties.Priority);
Assert.Equal(ExpectedFutureProject, extendedProperties.IterationPath);
Assert.Equal("New", extendedProperties.WorkItemState);
Assert.Equal(["content-curation"], extendedProperties.Tags);
Assert.Equal(["Highlight-March"], extendedProperties.Tags);
Assert.Equal(33, extendedProperties.ParentNodeId);
}

Expand Down
5 changes: 3 additions & 2 deletions actions/sequester/Quest2GitHub/Models/WorkItemProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,13 @@ month descending

private static IEnumerable<string> WorkItemTagsForIssue(QuestIssueOrPullRequest issue, IEnumerable<LabelToTagMap> tags, string copilotTag)
{
string? sprint = LatestStoryPointSize(issue)?.FullMonthText?.ToString();
foreach (var label in issue.Labels)
{
var tag = tags.FirstOrDefault(t => t.Label == label.Name);
if (tag.Tag is not null)
if ((tag.Tag is not null) && (sprint is not null))
{
yield return tag.Tag;
yield return tag.Tag.Replace("$FullMonthText$", sprint);
}
Comment thread
BillWagner marked this conversation as resolved.
}
// Add custom tag if one of the assignees is "Copilot":
Expand Down
18 changes: 16 additions & 2 deletions quest-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,19 @@
},
"ImportTriggerLabel": ":world_map: reQUEST",
"ImportedLabel": ":pushpin: seQUESTered",
"DefaultParentNode": 405108
}
"DefaultParentNode": 405108,
"WorkItemTags": [
{
"Label": ":sparkler: Highlight :sparkler:",
"Tag": "Highlight-$FullMonthText$"
},
{
"Label": ":mag_right: AISDLC :mag:",
"Tag": "SP-AISDLC"
},
{
"Label": ":mag_right: AIPlatform :mag:",
"Tag": "SP-AIPlatform"
}
]
}
Loading