diff --git a/.gitignore b/.gitignore index 37d7e73..28cde21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules .env +.DS_Store \ No newline at end of file diff --git a/action.yml b/action.yml index d257d4f..67851e0 100644 --- a/action.yml +++ b/action.yml @@ -39,6 +39,13 @@ inputs: Specify if a PR should be created with the updated test results. Defaults to "false" default: "false" required: false + clone-repo: + type: boolean + description: >- + Whether to clone the repository, defaults to "true" + Used for desktop app testing + required: false + default: "true" pr-title: description: >- The title of the PR to be created diff --git a/dist/index.js b/dist/index.js index fa68893..532a824 100644 --- a/dist/index.js +++ b/dist/index.js @@ -33636,10 +33636,12 @@ const chalk = __nccwpck_require__(8818); class Config { constructor() { let createPR = core.getInput("create-pr")?.toLowerCase()?.trim() || "false"; - if (!["true", "false"].includes(createPR)) { - throw new Error("Invalid value for create-pr. It should be a boolean"); + let cloneRepo = core.getInput("clone-repo")?.toLowerCase()?.trim() || "true"; + if (!["true", "false"].includes(createPR) || !["true", "false"].includes(cloneRepo)) { + throw new Error("Invalid value for create-pr or clone-repo. They should be booleans"); } else { createPR = JSON.parse(createPR); + cloneRepo = JSON.parse(cloneRepo); } this.input = { @@ -33650,6 +33652,7 @@ class Config { os: core.getInput("os") || "windows", version: core.getInput("version") || "latest", createPR, + cloneRepo, prBase: createPR ? core.getInput("pr-base") || "main" : "", prBranch: createPR ? core.getInput("pr-branch") : "", prTitle: createPR ? core.getInput("pr-title") : "", @@ -40082,6 +40085,7 @@ axios.interceptors.response.use( let testdriverBranch = config.input.branch; let key = config.input.key; let os = config.input.os; + let cloneRepo = config.input.cloneRepo; let testdriveraiVersion = config.input.version; let createPR = config.input.createPR; let prBranch = config.input.prBranch; @@ -40100,6 +40104,7 @@ axios.interceptors.response.use( console.log(chalk.yellow("repo:"), repo); console.log(chalk.yellow("branch:"), branch); console.log(chalk.yellow("os:"), os); + console.log(chalk.yellow("cloneRepo:"), cloneRepo); console.log(chalk.yellow("createPR:"), createPR); if (createPR) { if (prBranch) console.log(chalk.yellow("prBranch:"), prBranch); @@ -40136,6 +40141,7 @@ axios.interceptors.response.use( branch, prompt, os, + cloneRepo, prerun, version: testdriverBranch, key, diff --git a/src/config.js b/src/config.js index 88cafc5..0f5f333 100644 --- a/src/config.js +++ b/src/config.js @@ -5,10 +5,12 @@ const chalk = require("chalk"); class Config { constructor() { let createPR = core.getInput("create-pr")?.toLowerCase()?.trim() || "false"; - if (!["true", "false"].includes(createPR)) { - throw new Error("Invalid value for create-pr. It should be a boolean"); + let cloneRepo = core.getInput("clone-repo")?.toLowerCase()?.trim() || "true"; + if (!["true", "false"].includes(createPR) || !["true", "false"].includes(cloneRepo)) { + throw new Error("Invalid value for create-pr or clone-repo. They should be booleans"); } else { createPR = JSON.parse(createPR); + cloneRepo = JSON.parse(cloneRepo); } this.input = { @@ -19,6 +21,7 @@ class Config { os: core.getInput("os") || "windows", version: core.getInput("version") || "latest", createPR, + cloneRepo, prBase: createPR ? core.getInput("pr-base") || "main" : "", prBranch: createPR ? core.getInput("pr-branch") : "", prTitle: createPR ? core.getInput("pr-title") : "", diff --git a/src/index.js b/src/index.js index 424ab7f..3609170 100644 --- a/src/index.js +++ b/src/index.js @@ -72,6 +72,7 @@ axios.interceptors.response.use( let testdriverBranch = config.input.branch; let key = config.input.key; let os = config.input.os; + let cloneRepo = config.input.cloneRepo; let testdriveraiVersion = config.input.version; let createPR = config.input.createPR; let prBranch = config.input.prBranch; @@ -90,6 +91,7 @@ axios.interceptors.response.use( console.log(chalk.yellow("repo:"), repo); console.log(chalk.yellow("branch:"), branch); console.log(chalk.yellow("os:"), os); + console.log(chalk.yellow("cloneRepo:"), cloneRepo); console.log(chalk.yellow("createPR:"), createPR); if (createPR) { if (prBranch) console.log(chalk.yellow("prBranch:"), prBranch); @@ -126,6 +128,7 @@ axios.interceptors.response.use( branch, prompt, os, + cloneRepo, prerun, version: testdriverBranch, key,