Skip to content

Commit 2b60af5

Browse files
authored
Merge branch 'main' into dependabot-npm_and_yarn-playwright-b4ef2ee04d
2 parents f77cd5d + 460713f commit 2b60af5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/github/preview-url-pr-description.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ async function previewUrlPrDescription({ github, context }) {
1818
repo,
1919
pull_number: pullNumber
2020
});
21-
const urlSectionStart = '\n<!-- DBUX-TEST-URL-START -->\n';
21+
const urlSectionStart = '\n<!-- DBUX-TEST-URL-START -->';
2222
const urlSectionEnd = '\n<!-- DBUX-TEST-URL-END -->';
23-
const testUrl = `\n🔭🐙🐈 Test this branch here: <https://${owner}.github.io/${repo}/review/${headRef}>\n`;
23+
const testUrl = `\n\n🔭🐙🐈 Test this branch here: <https://${owner}.github.io/${repo}/review/${headRef}>\n`;
2424
let body = pr.data.body || '';
2525
// Remove any existing test URL section
2626
const startIdx = body.indexOf(urlSectionStart);
27-
const endIdx = body.indexOf(urlSectionEnd);
27+
const endIdx = body.lastIndexOf(urlSectionEnd);
2828
if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {
2929
body =
3030
body.slice(0, startIdx) + body.slice(endIdx + urlSectionEnd.length);

0 commit comments

Comments
 (0)