Skip to content

Commit 7fb987d

Browse files
committed
fix(desktop): nightly update notes no longer list the Full Changelog link as a change
1 parent 2c592a1 commit 7fb987d

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

‎apps/desktop/src/updates/releaseNotes.test.ts‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,44 @@ describe("normalizeDesktopUpdateReleaseNotes", () => {
173173
omittedReleaseCount: 0,
174174
});
175175
});
176+
177+
it("ignores the Full Changelog paragraph that ends GitHub's generated notes", () => {
178+
const fullChangelog = (from: string, to: string) =>
179+
`<p><strong>Full Changelog</strong>: <a class="commit-link" href="https://github.com/pingdotgg/t3code/compare/v${from}...v${to}"><tt>v${from}...v${to}</tt></a></p>`;
180+
const result = normalizeDesktopUpdateReleaseNotes(
181+
[
182+
{
183+
version: "0.1.3-nightly.20261024.3604",
184+
note: fullChangelog("0.1.3-nightly.20261023.3592", "0.1.3-nightly.20261024.3604"),
185+
},
186+
{
187+
version: "0.1.3-nightly.20261023.3592",
188+
note:
189+
"<h2>What's Changed</h2>\n<ul>\n" +
190+
'<li>fix(web): A by <a href="https://github.com/a">@a</a> in <a href="https://github.com/pingdotgg/t3code/pull/1">#1</a></li>\n' +
191+
'<li>fix(web): B by <a href="https://github.com/b">@b</a> in <a href="https://github.com/pingdotgg/t3code/pull/2">#2</a></li>\n' +
192+
"<li>Full Changelog: links open in the browser in #3</li>\n" +
193+
"</ul>\n" +
194+
fullChangelog("0.1.3-nightly.20261023.3579", "0.1.3-nightly.20261023.3592"),
195+
},
196+
],
197+
"0.1.3-nightly.20261024.3604",
198+
"nightly",
199+
);
200+
201+
expect(result).toEqual({
202+
releaseNotes: [
203+
{
204+
version: "0.1.3-nightly.20261023.3592",
205+
items: [
206+
"Full Changelog: links open in the browser in #3",
207+
"fix(web): B by @b in #2",
208+
"fix(web): A by @a in #1",
209+
],
210+
totalItems: 3,
211+
},
212+
],
213+
omittedReleaseCount: 0,
214+
});
215+
});
176216
});

‎apps/desktop/src/updates/releaseNotes.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ function isIgnoredReleaseNoteLine(line: string): boolean {
8888
normalized === "what's changed" ||
8989
normalized === "whats changed" ||
9090
normalized.startsWith("compare: ") ||
91-
normalized.includes("/compare/")
91+
normalized.includes("/compare/") ||
92+
// The feed's HTML footer loses its compare URL to stripMarkup, leaving only the range.
93+
/^full changelog: \S+\.\.\.\S+$/.test(normalized)
9294
);
9395
}
9496

0 commit comments

Comments
 (0)