chore(repo): fix enhanced release pr description to filter out dependency only updates (#3128)

This commit is contained in:
Eric Allam
2026-02-25 15:50:06 +00:00
committed by GitHub
parent f37bdaac84
commit c05b30adfe
+26 -9
View File
@@ -42,6 +42,16 @@ function parsePrBody(body) {
const trimmed = line.trim();
if (!trimmed.startsWith("- ") && !trimmed.startsWith("* ")) continue;
let text = trimmed.replace(/^[-*]\s+/, "").trim();
if (!text) continue;
// Skip dependency-only updates (e.g. "Updated dependencies:" or "@trigger.dev/core@4.4.2")
if (text.startsWith("Updated dependencies")) continue;
if (text.startsWith("`@trigger.dev/")) continue;
if (text.startsWith("@trigger.dev/")) continue;
if (text.startsWith("`trigger.dev@")) continue;
if (text.startsWith("trigger.dev@")) continue;
const prMatch = trimmed.match(prPattern);
if (prMatch) {
const prNumber = prMatch[1];
@@ -49,9 +59,6 @@ function parsePrBody(body) {
seen.add(prNumber);
}
let text = trimmed.replace(/^[-*]\s+/, "").trim();
if (!text) continue;
// Categorize
const lower = text.toLowerCase();
let type = "improvement";
@@ -214,12 +221,22 @@ function formatPrBody({ version, packageEntries, serverEntries, rawBody }) {
// Raw changeset output in collapsed section
if (rawBody) {
lines.push("<details>");
lines.push("<summary>Raw changeset output</summary>");
lines.push("");
lines.push(rawBody);
lines.push("");
lines.push("</details>");
// Strip the Changesets action boilerplate from the raw body
const cleanedBody = rawBody
.replace(
/This PR was opened by the \[Changesets release\].*?If you're not ready to do a release yet.*?\n/gs,
""
)
.trim();
if (cleanedBody) {
lines.push("<details>");
lines.push("<summary>Raw changeset output</summary>");
lines.push("");
lines.push(cleanedBody);
lines.push("");
lines.push("</details>");
}
}
return lines.join("\n");