From a961118b4c3707cb3042aa6e131e2845467fb20d Mon Sep 17 00:00:00 2001 From: AsafHirschfeld <68038744+AsafHirschfeld@users.noreply.github.com> Date: Sun, 11 May 2025 10:12:19 +0300 Subject: [PATCH 1/2] added support for a custom backslash repo --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6cd1af4..cedefd0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,6 +41,7 @@ async function run() { const pushToDashboard: boolean = core.getBooleanInput('pushToDashboard'); const githubToken = core.getInput('githubToken') const cloneUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git` + const backslashApi = core.getInput('backslashApi') const provider = isOnPremise ? 'github-enterprise-on-premise' : 'github' @@ -68,7 +69,7 @@ async function run() { } console.log(`Cli sha matches`); - const commonArgs = `--authToken=${authToken} ${ignoreBlock ? `--warnOnly`: ''} --deltaScan=${prScan} --analyzedBranch=${analyzedBranch} --repositoryCloneUrl=${cloneUrl} --provider=${provider} --gitProviderOrganization=${organization} ${baselineBranch && `--baselineBranch=${baselineBranch} `} ${githubExtraInput} --outputPath=${outputPath}` + const commonArgs = `--authToken=${authToken} ${ignoreBlock ? `--warnOnly`: ''} --deltaScan=${prScan} --analyzedBranch=${analyzedBranch} --repositoryCloneUrl=${cloneUrl} --provider=${provider} --gitProviderOrganization=${organization} ${baselineBranch && `--baselineBranch=${baselineBranch} `} ${githubExtraInput} --outputPath=${outputPath} --backslashAPI=${backslashApi}` const runCommand = `bash ${cliRunnerFileName} analyze ${commonArgs} ${pushToDashboard ? `--pushToDashboard` : ''}` From 8d4ef8c19724a03e385759081de4f61ba2c49d2c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 11 May 2025 07:13:22 +0000 Subject: [PATCH 2/2] Build: Update dist/ directory --- dist/build/index.js | 3 ++- dist/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/build/index.js b/dist/build/index.js index 7f0ea04..f3bbbca 100644 --- a/dist/build/index.js +++ b/dist/build/index.js @@ -44,6 +44,7 @@ function run() { const pushToDashboard = core.getBooleanInput('pushToDashboard'); const githubToken = core.getInput('githubToken'); const cloneUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git`; + const backslashApi = core.getInput('backslashApi'); const provider = isOnPremise ? 'github-enterprise-on-premise' : 'github'; const repositoryName = github.context.payload.repository.name; const organization = github.context.payload.organization.login; @@ -62,7 +63,7 @@ function run() { return core.setFailed(`Checksum failed, got ${fetchedHash} but expected ${generatedHash}`); } console.log(`Cli sha matches`); - const commonArgs = `--authToken=${authToken} ${ignoreBlock ? `--warnOnly` : ''} --deltaScan=${prScan} --analyzedBranch=${analyzedBranch} --repositoryCloneUrl=${cloneUrl} --provider=${provider} --gitProviderOrganization=${organization} ${baselineBranch && `--baselineBranch=${baselineBranch} `} ${githubExtraInput} --outputPath=${outputPath}`; + const commonArgs = `--authToken=${authToken} ${ignoreBlock ? `--warnOnly` : ''} --deltaScan=${prScan} --analyzedBranch=${analyzedBranch} --repositoryCloneUrl=${cloneUrl} --provider=${provider} --gitProviderOrganization=${organization} ${baselineBranch && `--baselineBranch=${baselineBranch} `} ${githubExtraInput} --outputPath=${outputPath} --backslashAPI=${backslashApi}`; const runCommand = `bash ${cliRunnerFileName} analyze ${commonArgs} ${pushToDashboard ? `--pushToDashboard` : ''}`; core.debug(`pushToDashboard: ${pushToDashboard}`); core.debug(`Running this command: ${runCommand}`); diff --git a/dist/index.js b/dist/index.js index 3eb89d8..4a2ffa7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -51,6 +51,7 @@ function run() { const pushToDashboard = core.getBooleanInput('pushToDashboard'); const githubToken = core.getInput('githubToken'); const cloneUrl = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}.git`; + const backslashApi = core.getInput('backslashApi'); const provider = isOnPremise ? 'github-enterprise-on-premise' : 'github'; const repositoryName = github.context.payload.repository.name; const organization = github.context.payload.organization.login; @@ -69,7 +70,7 @@ function run() { return core.setFailed(`Checksum failed, got ${fetchedHash} but expected ${generatedHash}`); } console.log(`Cli sha matches`); - const commonArgs = `--authToken=${authToken} ${ignoreBlock ? `--warnOnly` : ''} --deltaScan=${prScan} --analyzedBranch=${analyzedBranch} --repositoryCloneUrl=${cloneUrl} --provider=${provider} --gitProviderOrganization=${organization} ${baselineBranch && `--baselineBranch=${baselineBranch} `} ${githubExtraInput} --outputPath=${outputPath}`; + const commonArgs = `--authToken=${authToken} ${ignoreBlock ? `--warnOnly` : ''} --deltaScan=${prScan} --analyzedBranch=${analyzedBranch} --repositoryCloneUrl=${cloneUrl} --provider=${provider} --gitProviderOrganization=${organization} ${baselineBranch && `--baselineBranch=${baselineBranch} `} ${githubExtraInput} --outputPath=${outputPath} --backslashAPI=${backslashApi}`; const runCommand = `bash ${cliRunnerFileName} analyze ${commonArgs} ${pushToDashboard ? `--pushToDashboard` : ''}`; core.debug(`pushToDashboard: ${pushToDashboard}`); core.debug(`Running this command: ${runCommand}`);