diff --git a/packages/scripts/src/addOrbitChain/transforms.ts b/packages/scripts/src/addOrbitChain/transforms.ts index 7584d7d35a..e34dbf45a2 100644 --- a/packages/scripts/src/addOrbitChain/transforms.ts +++ b/packages/scripts/src/addOrbitChain/transforms.ts @@ -165,8 +165,17 @@ export const commitChangesAndCreatePR = async ( console.log("Changes committed successfully"); const issue = await getIssue(process.env.ISSUE_NUMBER!); console.log("Creating pull request..."); - await createPullRequest(branchName, orbitChain.name, issue.html_url); - console.log("Pull request created successfully"); + await createPullRequest(branchName, orbitChain.name, issue.html_url) + .catch((err) => { + if (err.message.includes("A pull request already exists")) { + console.log("Pull request already exists."); + } else { + throw err; + } + }) + .then(() => { + console.log("Pull request created successfully"); + }); core.endGroup(); };