Skip to content

Commit

Permalink
🐛 Fix uploadSarif option value (QD-10598)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiulpin committed Jan 7, 2025
1 parent 5851dc3 commit 459d541
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
3 changes: 2 additions & 1 deletion scan/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104074,7 +104074,7 @@ var require_package2 = __commonJS({
"../node_modules/@actions/artifact/package.json"(exports2, module2) {
module2.exports = {
name: "@actions/artifact",
version: "2.1.11",
version: "2.2.0",
preview: true,
description: "Actions artifact lib",
keywords: [
Expand Down Expand Up @@ -130197,6 +130197,7 @@ var require_upload_artifact = __commonJS({
core2.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`);
return {
size: uploadResult.uploadSize,
digest: uploadResult.sha256Hash,
id: Number(artifactId)
};
});
Expand Down
8 changes: 4 additions & 4 deletions vsts/QodanaScan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14700,11 +14700,11 @@ var require_utils3 = __commonJS({
args: (tl2.getInput("args", false) || "").split(",").map((arg) => arg.trim()),
resultsDir: tl2.getInput("resultsDir", false) || path2.join(home, "results"),
cacheDir: tl2.getInput("cacheDir", false) || path2.join(home, "cache"),
uploadResult: tl2.getBoolInput("uploadResult", false) || false,
uploadSarif: tl2.getBoolInput("uploadSarif", false) || true,
uploadResult: tl2.getBoolInput("uploadResult", false),
uploadSarif: tl2.getBoolInput("uploadSarif", false),
artifactName: tl2.getInput("artifactName", false) || "qodana-report",
useNightly: tl2.getBoolInput("useNightly", false) || false,
prMode: tl2.getBoolInput("prMode", false) || false,
useNightly: tl2.getBoolInput("useNightly", false),
prMode: tl2.getBoolInput("prMode", false),
// Not used by the Azure task
postComment: false,
additionalCacheKey: "",
Expand Down
6 changes: 3 additions & 3 deletions vsts/QodanaScan/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
},
{
"name": "uploadSarif",
"type": "string",
"type": "boolean",
"label": "Upload SARIF",
"defaultValue": "true",
"defaultValue": true,
"required": false,
"helpMarkDown": "Upload qodana.sarif.json as an qodana.sarif artifact to the job"
"helpMarkDown": "For SARIF SAST Scans Tab extension. Upload qodana.sarif.json as an qodana.sarif artifact to the job"
},
{
"name": "artifactName",
Expand Down
2 changes: 1 addition & 1 deletion vsts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ You probably won't need other options than `args`: all other options can be help
| `args` | Additional [Qodana CLI `scan` command](https://github.com/jetbrains/qodana-cli#scan) arguments, split the arguments with commas (`,`), for example `-i,frontend`. Optional. | - |
| `resultsDir` | Directory to store the analysis results. Optional. | `$(Agent.TempDirectory)/qodana/results` |
| `uploadResult` | Upload Qodana results as an artifact to the job. Optional. | `false` |
| `uploadSarif` | Upload qodana.sarif.json as an qodana.sarif artifact to the job. Optional. | `true` |
| `uploadSarif` | For SARIF SAST Scans Tab extension. Upload qodana.sarif.json as an qodana.sarif artifact to the job. Optional. | `true` |
| `artifactName` | Specify Qodana results artifact name, used for results uploading. Optional. | `qodana-report` |
| `cacheDir` | Directory to store Qodana caches. Optional. | `$(Agent.TempDirectory)/qodana/cache` |
| `prMode` | Analyze ONLY changed files in a pull request. Optional. | `false` |
Expand Down
8 changes: 4 additions & 4 deletions vsts/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export function getInputs(): Inputs {
args: (tl.getInput('args', false) || '').split(',').map(arg => arg.trim()),
resultsDir: tl.getInput('resultsDir', false) || path.join(home, 'results'),
cacheDir: tl.getInput('cacheDir', false) || path.join(home, 'cache'),
uploadResult: tl.getBoolInput('uploadResult', false) || false,
uploadSarif: tl.getBoolInput('uploadSarif', false) || true,
uploadResult: tl.getBoolInput('uploadResult', false),
uploadSarif: tl.getBoolInput('uploadSarif', false),
artifactName: tl.getInput('artifactName', false) || 'qodana-report',
useNightly: tl.getBoolInput('useNightly', false) || false,
prMode: tl.getBoolInput('prMode', false) || false,
useNightly: tl.getBoolInput('useNightly', false),
prMode: tl.getBoolInput('prMode', false),
// Not used by the Azure task
postComment: false,
additionalCacheKey: '',
Expand Down
2 changes: 1 addition & 1 deletion vsts/vss-extension.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "qodana-dev",
"name": "Qodana (Dev)",
"version": "2024.3.147",
"version": "2024.3.149",
"publisher": "JetBrains",
"targets": [
{
Expand Down

0 comments on commit 459d541

Please sign in to comment.