Skip to content

Commit

Permalink
[Settings]Fix release cycle links in OOBE What's New page (#35801)
Browse files Browse the repository at this point in the history
* Fix release cycle link in OOBE

Previously it would point to the 5ft last release instead.

* Adressed feedback
  • Loading branch information
mantaionut authored Nov 8, 2024
1 parent eed39e5 commit 3d306f6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,15 @@ private static async Task<string> GetReleaseNotesMarkdown()

// Regex to remove installer hash sections from the release notes, since there'll be no Highlights section for hotfix releases.
Regex removeHotfixHashRegex = new Regex(RemoveHotFixInstallerHashesRegex, RemoveInstallerHashesRegexOptions);

int counter = 0;
foreach (var release in latestReleases)
{
releaseNotesHtmlBuilder.AppendLine("# " + release.Name);
var notes = removeHashRegex.Replace(release.ReleaseNotes, "\r\n## Highlights");

// Add a unique counter to [github-current-release-work] to distinguish each release,
// since this variable is used for all latest releases when they are merged.
notes = notes.Replace("[github-current-release-work]", $"[github-current-release-work{++counter}]");
notes = removeHotfixHashRegex.Replace(notes, string.Empty);
releaseNotesHtmlBuilder.AppendLine(notes);
releaseNotesHtmlBuilder.AppendLine("&nbsp;");
Expand Down

0 comments on commit 3d306f6

Please sign in to comment.