From 54d3fc653c515607d6b1599201a383e9e07649b1 Mon Sep 17 00:00:00 2001 From: tiulpin Date: Wed, 21 Jun 2023 01:39:46 +0200 Subject: [PATCH] :bug: Set branch on Azure Pipelines environment --- vsts/QodanaScan/index.js | 3 +-- vsts/src/utils.ts | 2 +- vsts/vss-extension.dev.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/vsts/QodanaScan/index.js b/vsts/QodanaScan/index.js index 18b293ba..08d7d5c1 100644 --- a/vsts/QodanaScan/index.js +++ b/vsts/QodanaScan/index.js @@ -4632,11 +4632,10 @@ var require_utils2 = __commonJS({ if (args.length === 0) { const inputs = getInputs(); args = (0, qodana_12.getQodanaScanArgs)(inputs.args, inputs.resultsDir, inputs.cacheDir); - args = [...args, "-e", `QODANA_BRANCH=${process.env.BUILD_SOURCEBRANCH}`]; } return tl2.exec(qodana_12.EXECUTABLE, args, { ignoreReturnCode: true, - env: Object.assign(Object.assign({}, process.env), { NONINTERACTIVE: "1" }) + env: Object.assign(Object.assign({}, process.env), { QODANA_BRANCH: process.env.BUILD_SOURCEBRANCH, NONINTERACTIVE: "1" }) }); }); } diff --git a/vsts/src/utils.ts b/vsts/src/utils.ts index 10b633ea..19864d76 100644 --- a/vsts/src/utils.ts +++ b/vsts/src/utils.ts @@ -57,12 +57,12 @@ export async function qodana(args: string[] = []): Promise { if (args.length === 0) { const inputs = getInputs() args = getQodanaScanArgs(inputs.args, inputs.resultsDir, inputs.cacheDir) - args = [...args, '-e', `QODANA_BRANCH=${process.env.BUILD_SOURCEBRANCH}`] } return tl.exec(EXECUTABLE, args, { ignoreReturnCode: true, env: { ...process.env, + QODANA_BRANCH: process.env.BUILD_SOURCEBRANCH, NONINTERACTIVE: '1' } }) diff --git a/vsts/vss-extension.dev.json b/vsts/vss-extension.dev.json index 319d96af..1881b3a2 100644 --- a/vsts/vss-extension.dev.json +++ b/vsts/vss-extension.dev.json @@ -2,7 +2,7 @@ "manifestVersion": 1, "id": "qodana-dev", "name": "Qodana (Dev)", - "version": "2023.1.7", + "version": "2023.1.8", "publisher": "JetBrains", "targets": [ {