From e45a1aa4cd9e1ea068caadfc93ffd376591857be Mon Sep 17 00:00:00 2001 From: Yassine El Khattabi Date: Tue, 1 Oct 2024 13:49:14 +0100 Subject: [PATCH 1/3] Fix new line in instructions --- dist/index.js | 16 +++++++--------- src/index.js | 12 ++++-------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7209f70..62febbe 100644 --- a/dist/index.js +++ b/dist/index.js @@ -40014,11 +40014,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(`testdriver@${pgkVersion}`); console.log(`testdriver-action@${testdriverBranch}`); - let prompt = process.env.IS_DEV - ? "open youtube" - : config.input.prompt.replace(/(\r\n|\n)/g, function (match) { - return match === "\n" ? "\\n" : "\\r\\n"; - }); + let prompt = process.env.IS_DEV ? "open youtube" : config.input.prompt; console.log(""); console.log(chalk.green("Inputs")); @@ -40034,9 +40030,9 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.yellow("prTestFilename:"), prTestFilename); } console.log(chalk.yellow("prompt:")); - console.log(prompt.replace(/\\n/g, "\n").replace(/\\r\\n/g, "\r\n")); + console.log(prompt); console.log(chalk.yellow("prerun:")); - console.log(prerun.replace(/\\n/g, "\n").replace(/\\r\\n/g, "\r\n")); + console.log(prerun); console.log(""); console.log(chalk.green("TestDriver:"), '"Looking into it..."'); @@ -40044,6 +40040,10 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); const personalAccessToken = process.env.GITHUB_TOKEN; + if (personalAccessToken.length) { + console.log(chalk.green("TestDriver:"), '"Access Token Supplied..."'); + } + console.log(chalk.green("TestDriver:"), '"Starting my engine..."'); const { @@ -40177,8 +40177,6 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.yellow("Test:"), chalk.red("Fail")); } - console.log("share link before extraction", shareLink); - let extractedFromMarkdown = extractLink(shareLink); console.log(""); diff --git a/src/index.js b/src/index.js index 5ad71ff..e4f3a62 100644 --- a/src/index.js +++ b/src/index.js @@ -44,11 +44,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(`testdriver@${pgkVersion}`); console.log(`testdriver-action@${testdriverBranch}`); - let prompt = process.env.IS_DEV - ? "open youtube" - : config.input.prompt.replace(/(\r\n|\n)/g, function (match) { - return match === "\n" ? "\\n" : "\\r\\n"; - }); + let prompt = process.env.IS_DEV ? "open youtube" : config.input.prompt; console.log(""); console.log(chalk.green("Inputs")); @@ -64,9 +60,9 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.yellow("prTestFilename:"), prTestFilename); } console.log(chalk.yellow("prompt:")); - console.log(prompt.replace(/\\n/g, "\n").replace(/\\r\\n/g, "\r\n")); + console.log(prompt); console.log(chalk.yellow("prerun:")); - console.log(prerun.replace(/\\n/g, "\n").replace(/\\r\\n/g, "\r\n")); + console.log(prerun); console.log(""); console.log(chalk.green("TestDriver:"), '"Looking into it..."'); @@ -75,7 +71,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); const personalAccessToken = process.env.GITHUB_TOKEN; if (personalAccessToken.length) { - console.log(chalk.green("TestDriver:"), '"Access Token Supplied..."'); + console.log(chalk.green("TestDriver:"), '"Access Token Supplied..."'); } console.log(chalk.green("TestDriver:"), '"Starting my engine..."'); From 63cb9166632eb1b068cfa97902fdb26a71d6c9a2 Mon Sep 17 00:00:00 2001 From: Yassine El Khattabi Date: Tue, 1 Oct 2024 14:08:02 +0100 Subject: [PATCH 2/3] Fix version in test workflow --- .github/workflows/pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9c47729..48c021e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,6 @@ jobs: uses: actions/checkout@v3 - uses: ./ with: - version: windows-release prompt: | 1. open youtube 2. find a cat video From ede7ab56e3921e487c5582cea70bd22ec10b399c Mon Sep 17 00:00:00 2001 From: Yassine El Khattabi Date: Tue, 1 Oct 2024 14:18:10 +0100 Subject: [PATCH 3/3] Fix prerun script --- .github/workflows/pr.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 48c021e..324d025 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -19,8 +19,10 @@ jobs: 4. /summarize os: windows prerun: | - npm install dashcam-chrome --save - /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --load-extension=./node_modules/dashcam-chrome/build/ 1>/dev/null 2>&1 & + cd $env:TEMP + npm init -y + npm install dashcam-chrome + Start-Process "C:/Program Files/Google/Chrome/Application/chrome.exe" -ArgumentList "--start-maximized","--load-extension=$(pwd)/node_modules/dashcam-chrome/build" exit key: ${{ secrets.DASHCAM_WORKSPACE_API }} env: