Skip to content

A local-first personal finance app

add separator between PR body and bundle stats (#6715)

Matt Fiddaman502babd310a9
diff --git a/packages/ci-actions/bin/update-bundle-stats-comment.mjs b/packages/ci-actions/bin/update-bundle-stats-comment.mjs
index ea69903b33..98cbceb648 100644
--- a/packages/ci-actions/bin/update-bundle-stats-comment.mjs
+++ b/packages/ci-actions/bin/update-bundle-stats-comment.mjs
@@ -14,6 +14,9 @@ import process from 'node:process';
import { Octokit } from '@octokit/rest';
+const BOT_BOUNDARY_MARKER = '<!--- actual-bot-sections --->';
+const BOT_BOUNDARY_TEXT = `${BOT_BOUNDARY_MARKER}\n<hr />`;
+
function parseArgs(argv) {
const args = {
commentFile: null,
@@ -158,7 +161,10 @@ function upsertBlock(existingBody, block, markers) {
}
const separator = body.endsWith('\n') ? '\n' : '\n\n';
- return `${body}${separator}${block.trim()}`;
+ const boundary = body.includes(BOT_BOUNDARY_MARKER)
+ ? ''
+ : `${BOT_BOUNDARY_TEXT}\n\n`;
+ return `${body}${separator}${boundary}${block.trim()}`;
}
async function updatePullRequestBody(
diff --git a/upcoming-release-notes/6715.md b/upcoming-release-notes/6715.md
new file mode 100644
index 0000000000..511d5651ae
--- /dev/null
+++ b/upcoming-release-notes/6715.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [matt-fidd]
+---
+
+Add separator between PR body and bundle statistics