From 301eff6adbabbb4ff75415b52f632ef52e2e4ddc Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 2 Jan 2024 19:25:04 +0530 Subject: [PATCH] yarn command --- createPRToBeta.ts | 7 +++++-- package.json | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/createPRToBeta.ts b/createPRToBeta.ts index be6a894a77..98237c6545 100644 --- a/createPRToBeta.ts +++ b/createPRToBeta.ts @@ -2,15 +2,18 @@ // Pull request number should be provided while running this script // It will use the reference branch same as the shared PR // To create a new PR, Github auth token with scope 'repo' needs to be provided -// Command to run this script: fromPR=4369 authToken=abc123 npx ts-node createPRToBeta.ts +// Command to run this script: fromPR=4369 authToken=abc123 yarn run createPRToBeta import { Octokit } from "octokit" async function createPR (prNumber, baseBranch) { try { + if (!prNumber) throw new Error(`Please provide a PR number with 'fromPR' env variable`) + const octokit = new Octokit({ auth: process.env.authToken || '' }) + const owner = 'ethereum' const repo = 'remix-project' @@ -36,7 +39,7 @@ async function createPR (prNumber, baseBranch) { }) console.log('Pull Request Created!!! See: ', response.data.html_url) - + } catch (error) { console.error('Error during PR creation: ', error.message) } diff --git a/package.json b/package.json index 80e01f7090..3ad91b7184 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "updateBeta": "gulp & gulp updateBetaToMaster;", "updateLive": "gulp & gulp updateLiveToBeta;", "publishTagfromBeta": "gulp & gulp publishTagfromBeta;", + "createPRToBeta": "npx ts-node createPRToBeta.ts", "browsertest": "sleep 5 && yarn run nightwatch_local", "csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/src/assets/css/font-awesome.min.css' apps/remix-ide/src/assets/css/", "downloadsolc_assets_e2e": "node ./apps/remix-ide/ci/download_e2e_assets.js",