Skip to content

🎥 Make videos programmatically with React

Improve PR script

Jonny Burgerf082ed5eb033
diff --git a/packages/it-tests/src/scripts/pr.ts b/packages/it-tests/src/scripts/pr.ts
index 5b4b6fedd3..f698d766ea 100644
--- a/packages/it-tests/src/scripts/pr.ts
+++ b/packages/it-tests/src/scripts/pr.ts
@@ -34,8 +34,9 @@ const indexOfDiff = bodyIfThereIsOne.indexOf('\ndiff');
const body = bodyIfThereIsOne.slice(0, indexOfDiff).trim();
await $`git push origin HEAD`;
+
const output =
- await $`gh pr create --title "${goodPrTitle.message}" --body "${body ?? ''}"`.nothrow();
+ await $`gh pr create --title "${goodPrTitle.message}" --body "${body || goodPrTitle.message}"`.nothrow();
const prLine = new TextDecoder()
.decode(output.stderr)
@@ -43,4 +44,7 @@ const prLine = new TextDecoder()
.split('\n')
.find((line) => line.startsWith('https://'));
+if (!prLine) {
+ process.exit(0);
+}
await $`open ${prLine}`;